Skip to content

Instantly share code, notes, and snippets.

@egradman
egradman / redis-servefile
Created December 10, 2010 01:24
serve a redis dump.rdb file on the specified port
#!/bin/sh
# redis-servefile port filename
# serves a redis dump.rdb file on the specified port
port=$1
file=$2
rundir=`mktemp -d`
ln -s $file $rundir
@egradman
egradman / gist:675103
Created November 13, 2010 05:11
calendar code
import time
import atom
import gdata
import gdata.calendar
import gdata.calendar.service
def GetCalendarByTitle(calendar_service, title):
feed = calendar_service.GetAllCalendarsFeed()
calendar = [entry for entry in feed.entry if entry.title.text == title][0]
"""
quick and dirty rhino script to "hole-out" an inner convex angle so an end-mill can carve it
see:
http://www.kontraptionist.com/post/45218053861/slotted-construction-its-a-pretty-nice-thing-to
for the technique it implements
to use it:
- choose a cplane orthogonal to the face
- run the script
- select the object
#!/bin/bash
the_dir=$1
the_proj=$the_dir/*.xcodeproj
mkdir -p bin
rsync -avz $the_dir/bin/data/ bin/data
cp $the_dir/run.command . || :
xcodebuild -project $the_proj CONFIGURATION_BUILD_DIR=`pwd`/bin && sshpass -p 2bc rsync -avz --exclude=bin/data/ofxRemoteUISettings.xml ./ $2
class Debouncer {
public:
int debounce_delay;
long high_edge_interval;
long last_transition_at;
bool last_val;
bool last_state;
bool state;

Dear Everybody

An Open Letter to Everybody

Dear Everybody with whom I've ever communicated by email on the Internet. I am an asshole. Though you probably received an email purportedly from me exhorting you to check out my profile on LinkedIn, I did not send it. When I have received similar letters in the past, I've deleted them, and scoffed at the sender.

Please do NOT check out my profile on LinkedIn. I don't want you to see it. In fact, by the time you read this it will probably be gone.

Phones in pockets can do all sorts of funny things. I've pocket dialed people before. Everybody has. But I've never pocket emailed thousands of people before. That could only happen with an app written by a company with a complete lack of responsibility when it comes to personal data.