brew mysql

Install brew install mysql@5.6 Start Start the MySQL service at login with: brew services start mysql Run Run the MySQL service but don’t start it at login (nor boot) with: brew services run mysql Stop Stop the MySQL service with: brew services stop mysql Restart Restart the MySQL service with: brew services restart mysql

Category: mac

jdom, xpath

<dependencies> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.3</version> </dependency> <dependency> <groupId>org.jdom</groupId> <artifactId>jdom</artifactId> <version>2.0.2</version> </dependency> <dependency> <groupId>jaxen</groupId> <artifactId>jaxen</artifactId> <version>1.2.0</version> </dependency> </dependencies> //language=XML String s = “<?xml version=\”1.0\” encoding=\”UTF-8\”?>\n” + “<root xmlns:my=\”ns-telo\”>\n” + ” <tag>first</tag>\n” + ” <tag type=\”special\”>second</tag>\n” + ” <other>third</other>\n” + ” <other type=\”\”>fourth</other>\n” + ” <!– XPath –>\n” + ” <deep>\n” + ” <tag>\n” + ” <other>fifth</other>\n”… Read More »

source list ubuntu

vi /etc/apt/source.list jangan lupa sudo apt-get update berikut list repositori lokal : 1. Kambing UI deb http://kambing.ui.ac.id/ubuntu/ precise main restricted universe multiverse deb http://kambing.ui.ac.id/ubuntu/ precise-updates main restricted universe multiverse deb http://kambing.ui.ac.id/ubuntu/ precise-security main restricted universe multiverse deb http://kambing.ui.ac.id/ubuntu/ precise-backports main restricted universe multiverse 2. ITB deb ftp://ftp.itb.ac.id/pub/ubuntu precise main restricted universe multiverse deb ftp://ftp.itb.ac.id/pub/ubuntu precise-updates… Read More »

change jdk 6 to 7

sudo rm /usr/lib/jvm/default-java sudo ln -s java-1.7.0-openjdk-i386 /usr/lib/jvm/default-java

wifi linux

auto wlan0 iface wlan0 inet dhcp wpa-ssid namassid wpa-psk passwordnya dns-nameservers 8.8.8.8

dump gzip only rowdata to another server

#!/bin/bash # loop isi file well_list.txt # kemudian dump | gzip ke server lain # contoh nama table xx_telo_xx while read p; do mysqldump -uuser -ppassowrd –skip-add-drop-table –skip-add-locks –lock-tables=false namadatabase $(mysql -uuser -ppassowrd -D namadatabase -Bse “SHOW TABLES LIKE ‘%$p\_%’”) | gzip -c | ssh user@servertujuan “cat > /home/user/backupdb-rowdata/only-rowdata_$p.sql.gz” done < well_list.txt

scroll on screen

Control + a , then Escape . After that, you should be able to move your cursor around using the arrow keys

bind address mysql on mac

edit : /usr/local/opt/mysql@5.5/homebrew.mxcl.mysql\@5.5.plist tambahkan <string>–bind-address=0.0.0.0</string> dibawah <string>–datadir=/usr/local/var/mysql</string>

Category: mac