Credit: How to get vm arguments from inside of java application?
Wednesday, April 25, 2018
Clojure how to get JVM options from inside application
(.getInputArguments (java.lang.management.ManagementFactory/getRuntimeMXBean))
Credit: How to get vm arguments from inside of java application?
Credit: How to get vm arguments from inside of java application?
Saturday, December 9, 2017
Clojure has lesser typing error problems than the others well-known dynamic typing languages
Wednesday, July 12, 2017
Config number of file descriptors on Linux
Check file descriptor limit for a process. Vary depending on owner of the process
Credits:
$ cat /proc/{process-id}/limitsCheck current number of file descriptors of a process
$ sudo ls /proc/{process-id}/fd | wc -lSet file descriptors limit for a user at /etc/security/limits.conf
* soft nofile 64000Check system file descriptor limit
* hard nofile 64000
root soft nofile 64000
root hard nofile 64000
$ cat /proc/sys/fs/file-maxCheck current number of system file descriptors
$ cat /proc/sys/fs/file-nr
Credits:
Wednesday, December 21, 2016
Increase video volume
$ ffmpeg -i input -vcodec copy -af "volume=20dB" outputCredit: How to increase volume in a video without re-encoding the video
Convert .ts to .mp4
$ ffmpeg -i input.ts -acodec copy -vcodec copy out.mp4Credit: http://stackoverflow.com/a/17916418/1032449
Thursday, September 1, 2016
[PostgreSQL] How to verify if replication catch up with master change
[Run on master] Check master location with
[Run on replica] Check time from the latest reply
SELECT pg_current_xlog_location();[Run on replica] Check replica replayed location with
SELECT pg_last_xlog_replay_location();[Run on master] Check replica status from master
SELECT client_addr, state, sent_location, write_location, flush_location, replay_location FROM pg_stat_replication;*write, flush, replay are status of replica
[Run on replica] Check time from the latest reply
SELECT now() - pg_last_xact_replay_timestamp() AS replication_delay;Credit:
Wednesday, August 24, 2016
Shorthand for Git upstream (tracked) remote branch
It's @{u}.
For example, if you are on master branch, and master branch is tracked with origin/master. You can use git merge @{u} instead of git merge origin/master.
Reference: https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches#upstream-shorthand-k9UotnHmIO
For example, if you are on master branch, and master branch is tracked with origin/master. You can use git merge @{u} instead of git merge origin/master.
Reference: https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches#upstream-shorthand-k9UotnHmIO
Subscribe to:
Posts (Atom)
Collectd PostgreSQL Plugin
I couldn't find this link when searching with google https://www.collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresq...
-
sudo su postgres supply your Mac password modify /Library/PostgreSQL/9.x/data/pg_hba.conf from local all all md5 to local all all ...
-
This error message from chef is not very useful FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit ...
-
Formatting Run this command in shell sudo cpan JSON::XS Put this line to ~/.vimrc map <leader> jt <Esc> : %! json_xs -f json ...


