This helper has finally been moved into a gem called nav_lynx!
https://github.com/vigetlabs/nav_lynx
http://rubygems.org/gems/nav_lynx
Thanks to @brianjlandau and @reagent for getting that set up and tested!
| alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
| class Hash | |
| # options: | |
| # :exclude => [keys] - keys need to be symbols | |
| def to_ostruct_recursive(options = {}) | |
| convert_to_ostruct_recursive(self, options) | |
| end | |
| private | |
| def convert_to_ostruct_recursive(obj, options) | |
| result = obj |
This helper has finally been moved into a gem called nav_lynx!
https://github.com/vigetlabs/nav_lynx
http://rubygems.org/gems/nav_lynx
Thanks to @brianjlandau and @reagent for getting that set up and tested!
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| grep -r --color --exclude-dir={custom,lib,scripts} --exclude={*.xml,error_log} "beta" . |
| package t | |
| import ( | |
| "time" | |
| ) | |
| type NowFunc func() time.Time | |
| var Now = func() time.Time { return time.Now() } | |
| func NowForce(unix int) { |
| package main | |
| import ( | |
| "log" | |
| "math" | |
| ) | |
| func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
| var round float64 | |
| pow := math.Pow(10, float64(places)) |
| passw count | |
| 123456 47817 | |
| password 11548 | |
| 123456789 11133 | |
| 12345 8088 | |
| qwerty 5915 | |
| 12345678 5248 | |
| 111111 3514 | |
| abc123 3011 | |
| 123123 2971 |