Skip to content

Instantly share code, notes, and snippets.

@tischler
tischler / deep_delete
Created January 27, 2015 09:35
Deep Delete Via String Path
hash = { :a =>
{
:a => { :a => "foo", :b => "bar" },
:b => { :a => "foo", :c => "DELETEME" }
},
:b => {
:a => { :a => "foo", :b => "bar" },
:b => { :a => "foo", :c => "baz" }
},
:c => {
@tischler
tischler / keybase.md
Created December 17, 2014 23:15
keybase.md

Keybase proof

I hereby claim:

  • I am tischler on github.
  • I am tischler (https://keybase.io/tischler) on keybase.
  • I have a public key whose fingerprint is 5102 5209 14B0 2BFE 6A57 A4D7 797E C6C2 AF43 4DE0

To claim this, I am signing this object:

ruby -e'(f=proc{|x,y|sleep 1;system "clear";puts x;f[x
.gsub(/\/\\./,"~\/\\").gsub(/.o./,y ? "\\o\/":"|o|"),!y]})["~/\\"+"~"*12+"o~~"]
'
@tischler
tischler / code_read.js
Created May 2, 2012 20:51
Tim's Code read
function render_servers(environment_name) {
// ...
jQuery.getJSON(url, function(data) {
// you are using val as your incoming variable here, and also below
// $.each(data.servers, function(key, val) {
$.each(data.servers, function(server_name, server_data) {
// why are you using var $var_name here? $ is either for mechanically generated code/vars or
@@ -246,11 +246,14 @@ def set_subreddit():
if '+' in sr_name:
srs = set()
sr_names = sr_name.split('+')
- real_path = sr_name
- for sr_name in sr_names:
- srs.add(Subreddit._by_name(sr_name))
- sr_ids = [sr._id for sr in srs]
- c.site = MultiReddit(sr_ids, real_path)
+ if 'all' in sr_names:
ERROR: function hot(integer, integer, timestamp with time zone) does not exist at character 6
4
HINT: No function matches the given name and argument types. You might need to add explicit t
ype casts.
STATEMENT: create index idx_hot_reddit_thing_award on reddit_thing_award (hot(ups, downs, dat
e), date)