Skip to content

Instantly share code, notes, and snippets.

require 'json'
require 'open-uri'
class DependencyChecker
def initialize(*gems)
@gems = gems.flatten
@dep_cache = {}
end
def all_dependencies
@guenin
guenin / event❤.coffee
Created August 24, 2011 16:10
jQuery Event love
# Event love!
Pinger =
ping: ->
console.log 'ping!'
$(this).trigger('pinged')
Ponger =
pong: ->
console.log 'pong!'
@tomstuart
tomstuart / gist:1466504
Created December 12, 2011 10:40
FizzBuzz in the lambda calculus in Ruby
>> IF = -> b { b }
=> #<Proc:0x007fb4e4049cc8 (lambda)>
>> LEFT = -> p { p[-> x { -> y { x } } ] }
=> #<Proc:0x007fb4e403d680 (lambda)>
>> RIGHT = -> p { p[-> x { -> y { y } } ] }
=> #<Proc:0x007fb4e4028ff0 (lambda)>
>> IS_EMPTY = LEFT
@geeksam
geeksam / gist:3735442
Created September 17, 2012 03:46
Canned reply to recruiting inquiries

Hi, [insert recruiter's first name here]-

I've gone to some lengths to save everyone some time by maintaining a FAQ page on my resume website: http://resume.livingston-gray.com/faq.html

I've even gone so far as to change my LinkedIn profile so that it directs recruiters to read the FAQs before contacting me about relocation opportunities. So, thank you, [recruiter's first name]! By carefully ignoring all of that information, you've freed me from having to feel even remotely guilty for sending you a canned response.

=== Things to do in NYC with a ~7 Year Old ===
Brooklyn
Williamsburg
- McCarren Park
- Pool
- Brooklyn Flea - Sunday 10-4
- East River State Park
- Brooklyn Bowl - Sat/Sun 12-6
- Leonard Library - Mon-Sun 10-6
@debasishg
debasishg / gist:8172796
Last active April 16, 2025 13:43
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@ngsmrk
ngsmrk / sidekiq_monitoring
Created August 11, 2014 11:51
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed
@hellocatfood
hellocatfood / feedback.sh
Last active August 17, 2020 00:51
Do feedback loops on an image with transparenty
#!/bin/bash
# applies a black and white feedback effect to still images.
# usage: ./feedback.sh image.png 18
# this would apply the feedback effect 18 times to the image.png image and output the result as feedback.png
cp $1 feedback.png
loop=0