My Experience Notes These pages contain my experiences using technology. All of the works are working properly at the time when they wrote. You may use them for any purposes.
Saturday, July 18, 2015
How to use id.pool.ntp.org in Windows 7/8/8.1/10
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\DateTime\Servers
1 REG_SZ 0.id.pool.ntp.org
2 REG_SZ 1.id.pool.ntp.org
3 REG_SZ 2.id.pool.ntp.org
4 REG_SZ 3.id.pool.ntp.org
http://www.pool.ntp.org/zone/id
Wednesday, July 8, 2015
Installing Amazon SDK (old)
- Android SDK Manager -> Tools -> Manage Add-on Sites -> User Defined Sites -> New (or Edit if you already has one.)
- Enter URL https://s3.amazonaws.com/android-sdk-manager/redist/addon.xml
- Amazon device (optional)
- Amazon Fire Phone addon in Android 4.2.2 Level 17
- Amazon Fire Tablet add on in Android 4.4.2 level 19
- Extra (optional)
- Amazon Kindle Fire USB Driver
- Phone Build Tools: If you are developing for Fire Phone
Play Video (mp4,3gp,etc) From Resource (old)
- put your mp4 file into folder res/raw (you need to create folder raw under folder res)
For example d:\workspace\Test\res\raw
Application Name: Test
mp4 file name: gayatrimantra.mp4full path filename: d:\workspace\Test\res\raw\gayatrimantra.mp4 - to start your Video, write this code
public void ClickDeh(View view)
{
VideoView videoview = (VideoView) findViewById(R.id.videoView1);
Uri uri = Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.gayatrimantra);
videoview.setVideoURI(uri);
videoview.start();
}
Samsung I5700/Spica/Portal (old)
- remove your SIM Card & Micro SD-CARD from your device
- connect your mobile to PC using USB
- click update firmware, it will download your firmware (2.1) into your phone
- follow instruction.
- after firmware installation finish, your may shutdown your device
- reinsert your SIM/Micro SDCARD
- start your device normally
Upgrading your BBM to version 7 or above complete with your contacts (old)
- You need to create BB ID. To create an ID, you need a valid email for indentificate abour your self.
- Before updating your BBM you need to backup your contats localy to Micro SD Card.
- Update/upgrade your Blackberry ID application (required reboot).
- Update/upgrade your Blackberry Application World (required reboot).
- You may update/upgrade your BBM to version 7 (required reboot).
- After a new BBM version 7, it will restore your contacts and make your contacts backup into Blackberry cloud.
Joomla 3.1.x: ini_set() has been disabled for security reasons (old)
@ini_set(‘display_errors’, 0);
error_reporting(0);
@ini_set(‘display_errors’, 0);
class JConfig {
Debian 8 Jessie Repository
deb http://kambing.ui.ac.id/debian/ jessie main
deb-src http://kambing.ui.ac.id/debian/ jessie main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
# NON FREE
deb http://ftp.de.debian.org/debian jessie main non-free
# BACKPORT
# deb http://httpredir.debian.org/debian jessie-backports main contrib non-free
deb http://httpredir.debian.org/debian jessie-backports main
Installing JDK 8 on Debian Wheezy
- Download JDK-8 from URL above
# wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz - Extract it
# tar xvzf jdk-8u45-linux-x64.tar.gz - Create directory /usr/lib/JVM, if it does not exist. By default JDK will install on these folder
# mkdir /usr/lib/jvm/
Move JDK-8 folder to /usr/lib/JVM - Update alternative Java
# update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_45/bin/java 100
update-alternatives: using /usr/lib/jvm/jdk1.8.0_45/bin/java to provide /usr/bin/java (java) in auto mode
# update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_45/bin/javac 100
update-alternatives: using /usr/lib/jvm/jdk1.8.0_45/bin/javac to provide /usr/bin/javac (javac) in auto mode
# mv jdk1.8.0_45 /usr/lib/jvm/
Installing LAMP on Debian 8.0 (Jessie)
set password for root (super user)
Tuesday, July 7, 2015
Installing Debian 7 x64 ethernet card & wifi in Lenovo B490
- Download realtek r8169 firmware https://packages.debian.org/wheezy/all/firmware-realtek/download
- Install it by run this command
# dpkg -i firmware-realtek_0.36+wheezy.1_all.deb
- Download the driver from https://mega.co.nz/#!qIUySZYJ!PgfNRVCcXO-enbDuhziUqVCriMcDhbU-houaQ97c0yM
or the link was broken just search in google "download wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb" - Install it manualy bu run this command
# dpkg -i download wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb - Install network-manager by run this command
# apt-get install network-manager
Installing ODOO 8 in Debian
- Add this into your /etc/apt/sources.list
deb http://nightly.odoo.com/8.0/nightly/deb/ ./
or
deb http://nightly.odoo.com/master/nightly/deb/ ./ - Install odoo key
# wget https://nightly.odoo.com/odoo.key
# apt-key add odoo.key - update by run this command
sudo apt-get update - install ODOO 8 by run this command
sudo apt-get install odoo
Shellshock Vulnerability on Bash Shell
Run this on your linux shell (you don't need super user account for this):
$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
if the result like this:
vulnerable
this is a test
then, you need to upgrade your bash version.
Just run (as superuser or sudo)
# apt-get update
# apt-get upgrade
It will show bash upgrade like this:
Get:1 http://security.debian.org/ wheezy/updates/main bash amd64 4.2+dfsg-0.1+deb7u3 [1,501 kB]
After I upgrade my bash, the result becames like this:
this is a test
I use bash version : GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)
Reference: http://www.debiantutorials.com/how-to-detect-if-your-server-is-vulnerable-to-the-shellshock-bug-and-fix-it/
Indonesia Debian Repository (Wheezy)
Installing XFCE4 on Debian Wheezy x64
- To install Xfce, do the following
# apt-get install xfce4 - There are many useful utilities that come with Xfce, to install these
# apt-get install xfce4-goodies - You also can install xdm to login in start Xfce
# apt-get install xdm
Configuring LAN in Debian 7 x64 Minimal CLI Only
iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.11 -> change with your lan
netmask 255.255.255.0 -> change with your lan
gateway 192.168.1.1 -> change with your lan
dns-nameservers 8.8.8.8, 8.8.4.4 -> change or add with your name server
# /etc/init.d/networking restart
Personal linux command references (Debian command)
Note: these are command references for personal usage, you may use them as references freely with your own responsible. No warranty for any damages causing bay these references.
To show model
# dmidecode -s system-version
IdeaPad Gaming 3 15ARH7
16GB DDR5-4800 each slot manufacture tested
To show ram slot
# lshw -class memory
or
# dmidecode -t memory
Using ssh : remote to server using secure channel
$ ssh -l [user_name] [servername_or_ip]
scp : upload to server using secure channel (secure copy)
$ scp [file_source_to_upload] [user_name]@[servername_or_ip]:[full_path_destination_folder]
Using tar.gz
To compress
$ tar -cvf [file_name.tar] [folder_to_archive]
To decompress from tar.gz
$ tar -xvf [file_name.tar]
$ tar -czvf BoyerMoore.tar.gz ./BoyerMooreCopyPaste
Using p7zip
decompress
$ p7zip -d ./Kramaning.4.3.7z
compress folder
$ 7z a kramaning.7z ./Kramaning/*
Restart lightdm xfce desktop server
# systemctl start lightdm
# systemctl status lightdm
User management
To Add user
# adduser user_id --home /home/user_id
To delete user and home directory
# deluser --remove-home user_id
To delete user and all related files and folders
# deluser --remove-all-files user_id
Disk Management
To show disk using lsblk
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 260M 0 part /boot/efi
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 162.2G 0 part
├─nvme0n1p4 259:4 0 166G 0 part
├─nvme0n1p5 259:5 0 9.8G 0 part
├─nvme0n1p6 259:6 0 7.5G 0 part [SWAP]
├─nvme0n1p7 259:7 0 129.3G 0 part /
└─nvme0n1p8 259:8 0 2G 0 part
To show disk using idblk
# blkid
/dev/nvme0n1p7: UUID="df7ae6ac-f4ff-429e-9fb4-1a5f45e34f5e" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="94d61bfb-c413-4068-a231-89f12c26c343"
/dev/nvme0n1p5: LABEL="DATASHARE" UUID="A2FF-3F28" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="8be24844-0267-48c4-9c9c-0eb07b682984"
/dev/nvme0n1p3: LABEL="Windows-SSD" BLOCK_SIZE="512" UUID="9CB05AC3B05AA414" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="8996591a-1889-4be3-b932-11621d47ce94"
/dev/nvme0n1p1: LABEL_FATBOOT="SYSTEM_DRV" LABEL="SYSTEM_DRV" UUID="885A-5545" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="2ca7a85e-49bc-4ff5-8e2a-bf8d82f26ed9"
/dev/nvme0n1p8: LABEL="WINRE_DRV" BLOCK_SIZE="512" UUID="B0825B60825B29DC" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="0df86072-3532-4140-a733-79093411909c"
/dev/nvme0n1p6: UUID="7fef573b-5f9a-4c4e-a440-5c6cf459b965" TYPE="swap" PARTUUID="20da031c-ccd4-46d1-bc74-8c8f4dba0903"
/dev/nvme0n1p4: LABEL="mydata" BLOCK_SIZE="512" UUID="2698F69298F65FAB" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="13ee1824-6ae9-4982-ad57-68c55d6586b9"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="274d0d21-cb88-4b51-8a27-3290a4bee067"
To show disk using fdisk
# fdisk -l
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: Micron MTFDKCD512QFM-1BD1AABLA
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8CA19B9D-CFAB-4CC5-917E-96F2BD8BC30B
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved
/dev/nvme0n1p3 567296 340758527 340191232 162.2G Microsoft basic data
/dev/nvme0n1p4 340758528 688916479 348157952 166G Microsoft basic data
/dev/nvme0n1p5 688916480 709396479 20480000 9.8G Microsoft basic data
/dev/nvme0n1p6 709398528 725022719 15624192 7.5G Linux swap
/dev/nvme0n1p7 725022720 996118527 271095808 129.3G Linux filesystem
/dev/nvme0n1p8 996118528 1000214527 4096000 2G Windows recovery environment
To show disk using parted
# parted -l
Model: Micron MTFDKCD512QFM-1BD1AABLA (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition boot, esp
2 274MB 290MB 16.8MB Microsoft reserved partition msftres
3 290MB 174GB 174GB ntfs Basic data partition msftdata
4 174GB 353GB 178GB ntfs Basic data partition msftdata
5 353GB 363GB 10.5GB fat32 Basic data partition msftdata
6 363GB 371GB 8000MB linux-swap(v1) swap
7 371GB 510GB 139GB ext4
8 510GB 512GB 2097MB ntfs Basic data partition hidden, diag, no_automount
To Switch from Desktop to shell: ctrl + alt + f1
To Switch from shell to Desktop: ctrl + alt + f7
Install apt-cacher-ng
Installing Epson Inkjet L Series and M Series on Debian Wheezy
Debian 7.1 x64 installing firmware
- add this line into /etc/apt/sources.list
# non free
deb http://ftp.de.debian.org/debian wheezy main non-free - run update by issuing
# apt-get update - list available firmware
# aptitude search firmware - install your firmware
# apt-get install firmware-realtek firmware-atheros
Installing Openerp 6.1 on Debian 7.1 x64 (old)
# apt-get update
# apt-get upgrade
2. install gedit
# apt-get install gedit
# apt-get install postgresql
optional install pgadmin3 if use desktop
# apt-get install pgadmin3
# sudo su postgres
$ createuser openerp
as superuser n
create database y
create new roles y
$ psql -l
$ psql template1
# alter role openerp with password 'openerp';
quit from psql and back to root user (\q enter)
apt-get install python-dateutil python-feedparser python-gdata python-ldap \
python-libxslt1 python-lxml python-mako python-openid python-psycopg2 \
python-pybabel python-pychart python-pydot python-pyparsing python-reportlab \
python-simplejson python-tz python-vatnumber python-vobject python-webdav \
python-werkzeug python-xlwt python-yaml python-zsi
6. download packaged deb and install by issuing this
# dpkg -i openerp_6.1-latest-1_all.deb
it may take sometimes to install pyhton library required by openerp, wait until it finish.
7. edit file /etc/openerp/openerp-server.conf (password in stap 4)
db_password = openerp
8. run openerp service by issuing
# service openerp start
# service openerp restart
9. run openerp client using browser http://localhost:8069
- /usr/lib/pymodules/python2.7/openerp/
- /usr/share/pyshared/openerp
- /usr/lib/pymodules/python2.7/openerp/addons
- /usr/share/pyshared/openerp/html_view
Installing LAMP on Debian 7.1 (Wheezy)
set password for root (super user)
Repairing GRUB UEFI Dual Boot Debian 7.1 x64 and Windows 8 x64
- Update your Debian and run# apt-get install grub-efi-amd64This command will remove grub package, and choose yes
- Configure your GRUB using this command# modprobe dm-mod
# grub-install - Apply your new grub into EFI Partition# update-grub
- This procedure only fix boot into Debian. To create boot option to load Windows 8 boot manager you need UUID for EFI partition by running# blkidwrite down UUID for EFI Partition (it may be label as "System Reserved") with size about 100M-130M.
for my case UUID is 4842-E4F1 - edit file /etc/grub.d/40_custom and at the end of file addmenuentry "Microsoft Windows 8" {the file becomes like this:
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root 4842-E4F1
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Microsoft Windows 8" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root 4842-E4F1
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
} - reinstall and reconfigure your grub by issuing :# grub-install
# update-grub
Installing Webmin on Debian 7.1 (Wheezy)
How to create a WHM user without an associated domain
- Log in to the server as the root user via SSH.
- Create a user with the system utility with the following command:
# adduser [username] - Set a password for the user with the following command:
# passwd [username] - Create an entry in the resellers file with minimal permissions with the following command:
# echo "[username]:all" >> /var/cpanel/resellers - Log in to WHM as the root user.
- Navigate to Home >> Resellers >> Edit Reseller Nameservers and Privileges.
- Select username from the list, Click Submit.
- Apply the desired permissions to the user, Click Save.
Note: replace [username] with Linux user id / login
Src: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/CreateAccountwithoutdomain
CLOSE INFO
Tomcat 6.x User Roles
- <role rolename="manager-gui"/>
- <role rolename="manager-script"/>
- <role rolename="manager-jmx"/>
- <role rolename="manager-status"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="example" password="example" roles="manager-gui"/>
</tomcat-users>