Skip to content

Instantly share code, notes, and snippets.

Avatar
🎿
NOP Sledding

Jameel Haffejee RC1140

🎿
NOP Sledding
View GitHub Profile
View gist:389875
import re
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone
from metaphone import dm as double_metaphone
# get the Redis connection
from jellybean.core import redis
import models
# Words which should not be indexed
View bejewelled.clj
(ns ^{:doc
"Bejewelled Blitz (Facebook) player
Clojure program to play Bejewelled Blitz on Facebook
Work in progress
Only works with game on primary monitor
First you need to determine where the game board is on the screen
then set the :x and :y values in the game-loc def appropriately
@joeyAghion
joeyAghion / simple_redis_profile.rb
Created Oct 13, 2010
By sampling keys from your redis databases, this script tries to identify what types of keys are occupying the most memory.
View simple_redis_profile.rb
#!/usr/bin/env ruby
# Evaluates a sample of keys/values from each redis database, computing statistics for each key pattern:
# keys: number of keys matching the given pattern
# size: approximation of the associated memory occupied (based on size/length of value)
# percent: the proportion of this 'size' relative to the sample's total
#
# Copyright Weplay, Inc. 2010. Available for use under the MIT license.
@pfleidi
pfleidi / gridstoretest.js
Created Dec 19, 2010
Example using the mongodb-native module and step to write to mongodb gridfs
View gridstoretest.js
var Db = require('mongodb').Db,
Connection = require('mongodb').Connection,
Server = require('mongodb').Server,
GridStore = require('mongodb').GridStore,
Step = require('step'),
Sys = require('sys'),
Fs = require('fs');
var database;
@jasonrudolph
jasonrudolph / about.md
Last active Oct 27, 2020
Programming Achievements: How to Level Up as a Developer
View about.md
@johnboxall
johnboxall / dns.py
Created Aug 15, 2011
Twisted DNS server!
View dns.py
# http://notmysock.org/blog/hacks/a-twisted-dns-story.html
# http://blog.inneoin.org/2009/11/i-used-twisted-to-create-dns-server.html
# twistd -y dns.py
import socket
from twisted.internet.protocol import Factory, Protocol
from twisted.internet import reactor
from twisted.names import dns
from twisted.names import client, server
@lucasrizoli
lucasrizoli / gist:1603274
Created Jan 12, 2012
70 Unique Ways to Encode <
View gist:1603274
<
%3C
&lt
&lt;
&LT
&LT;
&#60
&#060
&#0060
&#00060
@aemkei
aemkei / LICENSE.txt
Last active Jan 19, 2021 — forked from 140bytes/LICENSE.txt
Binary Tetris - 140byt.es
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@hrldcpr
hrldcpr / tree.md
Last active Jan 8, 2021
one-line tree in python
View tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active Jan 13, 2021 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
View pedantically_commented_playbook.yml
This playbook has been removed as it is now very outdated.