Skip to content

Instantly share code, notes, and snippets.

View dylanvee's full-sized avatar

Dylan Vassallo dylanvee

View GitHub Profile
@justintv
justintv / .bashrc
Created August 17, 2009 00:53
Display git branch in bash prompt
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"
gemcutter => redis downloads spec
=================================
keys
----
downloads => global counter for all gem downloads
downloads:today => sorted set for downloads from today
downloads:rubygem:rails => counter for all rails downloads
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads
@thelibrarian
thelibrarian / Wombat.tmtheme
Created February 15, 2010 23:46
Wombat theme for TextMate, based on the original Vim theme (http://dengmao.wordpress.com/2007/01/22/vim-color-scheme-wombat/)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Lars H. Nielsen (translated by Tony Kemp)</string>
<key>name</key>
<string>Wombat</string>
<key>settings</key>
<array>
'''
redis_search.py
Written by Josiah Carlson July 3, 2010
Released into the public domain.
This module implements a simple TF/IDF indexing and search algorithm using
Redis as a datastore server. The particular algorithm implemented uses the
@mgp
mgp / redis_memory_benchmark_v1.py
Created April 6, 2011 04:27
Quantifies the memory optimizations of Redis 2.2, and memory costs of zsets versus sets.
"""
Copyright Michael Parker 2011.
Program to quantify the memory usage of:
a. The compact hash and set implementations in Redis 2.2 described at
http://redis.io/topics/memory-optimization and
http://redis.io/presentation/Pnoordhuis_whats_new_in_2_2.pdf versus their
counterparts that do not contain integers. For the comparisons to be
meaningful, be sure to have hash-max-zipmap-entries and
set-max-intset-entries present in your redis.conf file.
@mixonic
mixonic / server.js
Created April 28, 2011 22:49
Node.js + Socket.io + Bash. A collaborative terminal for your browser.
//
// This server will start a bash shell and expose it
// over socket.io to a browser. See ./term.html for the
// client side.
//
// You should probably:
//
// npm install socket.io
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js
//
@josiahcarlson
josiahcarlson / streaming_api.py
Created May 20, 2011 09:38
A way of implementing a Twitter-like streaming API without pubsub
'''
streaming_api.py
Written May 17-20, 2011 by Josiah Carlson
Released under the GNU GPL v2
available: http://www.gnu.org/licenses/gpl-2.0.html
Other licenses may be available upon request.
Given a Redis server and a task queue implementation, this code implements the
@jamiew
jamiew / google_twunter_lol
Created July 28, 2011 20:34
All the dirty words from Google's "what do you love" project: http://www.wdyl.com/
easterEgg.BadWorder.list={
"4r5e":1,
"5h1t":1,
"5hit":1,
a55:1,
anal:1,
anus:1,
ar5e:1,
arrse:1,
arse:1,
@tkersey
tkersey / gist:1130675
Created August 7, 2011 19:16
Getting a Motorola SBG6580 into “Bridge” mode

found at: http://fascinated.fm/post/2379188731/getting-a-motorola-sbg6580-into-bridge-mode-on

Getting a Motorola SBG6580 into “Bridge” mode on TimeWarner Wideband

  1. Unplug coax cable from Motorola
  2. Hold down the white reset button on the back panel with a pen for 30s.  This resets all settings to factory defaults. The modem will be auto-reconfigured once you plug in the coax cable.
  3. When modem is back on plug in a computer with an Ethernet cable into the modem.
  4. Connect to http://192.168.0.1 and login with “admin” / “motorola”
  5. Now you will make some changes:
 
  • Wireless -> Primary Network -> Disabled
How to add cmd-left-arrow and cmd-right-arrow (without shift) key bindings to the mac os x Terminal
app if the Lion install removed this bindings from your system.
1) Open "System Preferences".
2) Go to "Keyboard".
3) Select the "Keyboard Shortcuts" tab.
4) Select "Application Shortcuts" from the list of items in the left.
5) Press "+" to add a new shurtcut.
6) As "Application" select "Terminal", as "Menu Title" use: "Select Next Tab". For the "Keyboard Shortcut" field just select the field and press cmd-right-arrow.
7) Repeat again from step 5, using "Select Previous Tab" as Menu Title and pressing cmd-left-arrow as keyboard shortcut.