Skip to content

Instantly share code, notes, and snippets.

egradman

Block or report user

Report or block egradman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View innerhole.py
"""
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
View xcbuildandsync
#!/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
View gist:45bb011ceb568e09c4a5
class Debouncer {
public:
int debounce_delay;
long high_edge_interval;
long last_transition_at;
bool last_val;
bool last_state;
bool state;
@egradman
egradman / sample.ipynb
Last active Jun 18, 2019
Simple Google Spreadsheets to Pandas DataFrame in IPython Notebook
View sample.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist.md

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.

@egradman
egradman / cross-compile raspberry pi openframeworks
Created Feb 20, 2014
Cross-compiling OpenFrameworks 0.8 for Raspbian
View cross-compile raspberry pi openframeworks
# cross-compile raspberry pi openframeworks
Tested for my setup:
- Ubuntu 12.04 32-bit
- 2014-01-07-wheezy-raspbian
- OpenFrameworks 0.8 (release)
- My Pi is NFS booting from the Ubuntu box, FWIW.
Follow the directions here:
@egradman
egradman / print_win32_vector.py
Created Aug 28, 2012
print_win32_vector.py which fixes scale factor for ULS M300 et al.
View print_win32_vector.py
#!/usr/bin/env python
'''
print_win32_vector.py
This extension will generate vector graphics printout, specifically for Windows GDI32.
Copyright (C) 2012 Alvin Penner, penner@vaxxine.com
This is a modified version of the file dxf_outlines.py by Aaron Spike, aaron@ekips.org
It will write only to the default printer.
The printing preferences dialog will be called.
@egradman
egradman / gist:1505388
Created Dec 21, 2011
tropo python webapi coroutines
View gist:1505388
import tropo
coroutines = {}
def prompt_text(self, prompt, number):
"""
initiate a conversation with <phone>, asking a prompt
(merely pings the outbound session endpoint)
"""
@egradman
egradman / VideoSpriteBatchNode.h
Created Apr 26, 2011
cocos2d video sprite (batch node)
View VideoSpriteBatchNode.h
@interface VideoSpriteBatchNode: CCSpriteBatchNode
{
AVURLAsset *asset;
AVAssetTrack *videoTrack;
AVAssetReader *assetReader;
AVAssetReaderTrackOutput *trackOutput;
}
@property(nonatomic,retain) AVURLAsset *asset;
@property(nonatomic,retain) AVAssetTrack *videoTrack;
@property(nonatomic,retain) AVAssetReader *assetReader;
@egradman
egradman / redis-servefile
Created Dec 10, 2010
serve a redis dump.rdb file on the specified port
View redis-servefile
#!/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
You can’t perform that action at this time.