- Use Digest.hexencode
- Use String#unpack
string.unpack('H*').firstHex to String
- Use Array#pack
(def f (future (while true (your-function ... ))))
(future-cancel f)All you have to do as describe in this SO comment is to replace true with (not (Thread/interrupted)). Example:
(future (while (not (Thread/interrupted)) (your-function ... )))Because future-cancel will send interrupt signal to the future, Thread/interrupted will be changed to true. Now your future-cancel should work as expected.
log_statement = 'all'2. To reload config, sending SIGHUP to postgres server by going to psql shell and execute:
select pg_reload_conf();There's an another way to send SIGHUP, please refer to the link below
=# CREATE DATABASE new_database_name WITH TEMPLATE original_database_name;
$ createdb -T original_database_name new_database_nameCredit: http://stackoverflow.com/a/6739995
axel -n 10 http://url/big-file10 is number of connections
git remote prune originBut also you could give --prune or -p argument to fetch or pull to do the pruning for you after it's done with its normal behavior. For example,
git fetch -p
git pull -pIf you are in the habit of using remote prune that's fine. These prune arguments just save you one extra step if you just put them in to help cleanup once in a while.
start-stop-daemon -d dir_want_to_run_on -b -m -p pidfile.pid --start --startas command
start-stop-daemon -p pidfile.pid --stop
$ ruby -rnet/http -e "puts Net::HTTP.get(URI('https://github.com'))"
$ ruby -rnet/http -e "puts Net::HTTP.get(URI('https://your_webserver'))"If you get back proper result for the first command and get the same error for the second command. That's the same problem I had. If you get errors on both commands, this post won't help solving you problem.
$ openssl s_client -connect github.com:443
$ openssl s_client -connect your_webserver.com:443In github's server case, you will get 0 and 1. On the other hand, in your web server case, you probably get only 0. SSL certificate chains section of this nginx documentation page has a good explanation of the chain.
(.getInputArguments (java.lang.management.ManagementFactory/getRuntimeMXBean)) Credit: How to get vm arguments from inside of java applic...