Skip to content

Instantly share code, notes, and snippets.

@jellea
jellea / KindleToEvernote.py
Created May 9, 2012 13:56 — forked from jplattel/KindleToEvernote.py
Kindle clippings to Evernote
import os
import time
document = open("My Clippings.txt","r")
data = "".join(document.readlines())
notes = []
try:
clippings = data.split('==========')
@jellea
jellea / trollduino.pde
Created May 14, 2012 15:32
Mac address trolling
#include <SPI.h>
#include <Ethernet.h>
int min = 0;
int max = 255;
void setup(){
}
void loop(){
byte mac[] = {random(min, max), random(min, max), random(min, max), random(min, max), random(min, max), random(min, max) };
@jellea
jellea / gist:3438926
Created August 23, 2012 17:18
Webcam snapshot on every git commit
#!/bin/bash
#
# This script will make a webcam snapshot every commit. The jpg file will have
# the commit id as the filename.
#
# This script requires imagesnap. Install with: 'brew install imagesnap'
#
# Put this file in the '.git/hooks/' name it 'post-commit' and chmod it by:
# 'chmod +x .git/hooks/post-commit'
#
@jellea
jellea / markdown2html.py
Created August 30, 2012 11:24
Markdown2HTML
import os, markdown2, fnmatch # dependant on python-markdown2
tmp = open("template.html","r").read() # HTML document with {{content}} tag
def locate(pattern, root=os.curdir):
'''Locate all files matching supplied filename pattern in and below
supplied root directory.'''
for path, dirs, files in os.walk(os.path.abspath(root)):
for filename in fnmatch.filter(files, pattern):
yield os.path.join(path, filename)
@jellea
jellea / gist:3756445
Created September 20, 2012 15:01
Scraper for I love alaska
for i in $(seq 13); do wget "http://www.minimovies.org/video/ILoveAlaska/Episode_$i.flv"; done
for i in $(seq 13); do ffmpeg -i "Episode_$i.flv" -acodec copy "text_$i.mp3"; done
@jellea
jellea / rush-22.js
Created October 29, 2012 07:35
Play!
$$ = "hot fix"
__ = "push zone"
fixme = [
[ 00, 00, 01, 02, 02, 02 ],
[ 03, 00, 01, 04, 05, 05 ],
[ 03, $$, $$, 04, 00, 00 , __, __],
[ 00, 05, 00, 04, 06, 06 ],
[ 07, 05, 08, 08, 00, 00 ],
[ 07, 09, 09, 09, 00, 00 ]
@jellea
jellea / musclesynth.ino
Created June 14, 2013 11:09
MuscleSynth is a synthesizer which you control via your muscles.
// Dependencies: eHealth, Mozzi.
#include <eHealth.h>
float ECG = 0;
int ECGfreq = 100;
unsigned long lastsampleECG = 0;
unsigned long time = 0;
#include <MozziGuts.h>
#include <ReverbTank.h>
@jellea
jellea / awesome.rb
Created August 21, 2013 19:05 — forked from xorl/gist:2295504
require 'formula'
class Awesome < Formula
url 'http://awesome.naquadah.org/download/awesome-3.4.10.tar.bz2'
homepage 'http://awesome.naquadah.org/'
md5 '245087f8065867eff37a2133287d5c03'
depends_on 'cmake'
depends_on 'lua'
depends_on 'imlib2'
@jellea
jellea / gist:6306152
Created August 22, 2013 11:42
Get all Twitter followers as html. Paste in console while being on Twitter.
var url = 'https://twitter.com/jellea/followers/users?include_available_features=0&include_entities=1';
var list = '';
var request = function(cursor){
var curs = '&cursor='+cursor;
$.getJSON(url+curs,function(data){
list+=data.items_html;
if(data.has_more_items){
request(data.cursor);
}
});
@jellea
jellea / gist:6510897
Last active August 28, 2018 05:53
Node.js Forever rcng script for FreeBSD
#!/bin/sh
# PROVIDE: forever
# REQUIRE: NETWORKING SERVERS DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
# Taken from http://habrahabr.ru/post/137857/
. /etc/rc.subr