The fix is here https://github.com/rvm/rvm/issues/3540#issuecomment-152824133
I copied the fix here just in case it's removed in the future
Another option is to create .bash_logout with a single line:
shell_session_update
Another option is to create .bash_logout with a single line:
shell_session_update
What's clojure equivalent of ruby's `caller` method? http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-caller
To put it another way, if a function is call from multiple places, at runtime, is there a way to print out caller for debugging purpose?Thanks to Alex Miller. He answered
the Thread class has methods to inspect the stack
(Thread/dumpStack) will just dump that thread's stack to stderr
or (Thread/getStackTrace) gives you an array of StackTraceElement's that you can traverse and do whateverBasically, we can just use Java's Thread class. To be more precise, getStackTrace is an instance method so we have to call it this way.
(.getStackTrace (Thread/currentThread))We'll get back Java's array of StackTraceElement class.
$ ffmpeg -i input.flv -c copy -copyts output.mp4Tested on: OS X 10.11
(print (str (char 27) "[2J")) ; clear screenCredit: http://codereview.stackexchange.com/questions/17603/critique-my-clojure-game-of-life-code
(print (str (char 27) "[;H")) ; move cursor to the top left corner of the screen
lsof -i :80Change 80 to any port number you like.
# SELECT * FROM pg_stat_user_indexes ORDER BY idx_scan DESC;If your database is manage by Rails's schema, you could filter out auto generated public key indexes like so
# SELECT * FROM pg_stat_user_indexes WHERE indexrelname NOT LIKE '%_pkey' ORDER BY idx_scan DESC;
git log --pretty=format: --name-only | sort | uniq -c | sort -rg | lessLiterally copied from the answer of "Finding most changed files in git"
If we had a composite index on three fields: we would be able to use it for queries on the first field, for queries on the first two fields and for queries involving all three fields, but not on any other field combination.Copied directly from How to stop worrying and love your Postgres indexes
You might also what to order the result by query_start or state_changeselect * from pg_stat_activity where datname = YOUR_DB_NAME and state = 'active'
$ lein with-profile test repl
Warning: no nREPL dependency detected.
Be sure to include org.clojure/tools.nrepl in :dependencies of your profile.
...
Error loading clojure.tools.nrepl.server: Could not locate clojure/tools/nrepl/server__init.class or clojure/tools/nrepl/server.clj on classpath:
Error loading complete.core: Could not locate complete/core__init.class or complete/core.clj on classpath:
Exception in thread "main" java.lang.ClassNotFoundException: clojure.tools.nrepl.server, compiling:(/private/var/folders/7d/98yf91rn0yz6wbh56h5q7rkh0000gn/T/form-init2792809345387087761.clj:1:1340)The reason is because unlike default profile, tools.nrepl isn't added as dependency for test profile. You can verify this by comparing the output between lein pprint (or lein with-profile default pprint) and lein with-profile test pprint.
$ lein with-profile default,test replWith the command above, lein should start the repl without any errors.
complete -F _docker dReload your shell. And that's it!
I couldn't find this link when searching with google https://www.collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresq...