To install MySQL via Homebrew on Mac, do as follows:
$ brew install mysql
$ mysql.server start
Tuesday, November 29, 2016
Remove MariaDB installed via Homebrew on Mac
To remove MariaDB installed via Homebrew on Mac, do as follows:
$ sudo mysql.server stop
$ brew remove mariadb
$ brew cleanup
Reference:
https://gist.github.com/vitorbritto/0555879fe4414d18569d
$ sudo mysql.server stop
$ brew remove mariadb
$ brew cleanup
Reference:
https://gist.github.com/vitorbritto/0555879fe4414d18569d
Thursday, November 24, 2016
Windows equivalent for grep and wc -l
If you want to find the number of established connections on 8080 in Windows, you can use the following command:
netstat -an | findstr 8080 | findstr ESTABLISHED | find /c /v ""
References:
http://superuser.com/questions/300815/grep-equivalent-for-windows-7
http://superuser.com/questions/959036/what-is-the-windows-equivalent-of-wc-l
netstat -an | findstr 8080 | findstr ESTABLISHED | find /c /v ""
References:
http://superuser.com/questions/300815/grep-equivalent-for-windows-7
http://superuser.com/questions/959036/what-is-the-windows-equivalent-of-wc-l
Tuesday, November 22, 2016
Get PGID in Mac or Linux
To get PGID in Mac or Linux, use the following command:
ps -o pgid= 1115 | tr -d ' '
Reference:
http://stackoverflow.com/questions/392022/best-way-to-kill-all-child-processes
ps -o pgid= 1115 | tr -d ' '
Reference:
http://stackoverflow.com/questions/392022/best-way-to-kill-all-child-processes
Friday, November 4, 2016
List files in a jar file
To list files in a jar file, do as follows:
unzip -l build/libs/spring-boot-throwaway-branches-1.0.jar
unzip -l build/libs/spring-boot-throwaway-branches-1.0.jar
Thursday, November 3, 2016
Get CPU count in Mac
To get CPU count in Mac, do as follows:
$ sysctl -n hw.ncpu
8
$
Reference:
http://stackoverflow.com/questions/1715580/how-to-discover-number-of-logical-cores-on-mac-os-x
$ sysctl -n hw.ncpu
8
$
Reference:
http://stackoverflow.com/questions/1715580/how-to-discover-number-of-logical-cores-on-mac-os-x
Wednesday, November 2, 2016
Get the start and expiry dates of a SSL certificate in a server
To get the start and expiry dates of a SSL certificate in a server, do as follows:
openssl s_client -connect 1.2.3.4:443 | openssl x509 -noout -dates
openssl s_client -connect 1.2.3.4:443 | openssl x509 -noout -dates
Subscribe to:
Posts (Atom)