Skip to content

Instantly share code, notes, and snippets.


Jonathan Dahan jedahan

View GitHub Profile
View background.asm
.inesprg 1 ; 1x 16KB PRG code
.ineschr 1 ; 1x 8KB CHR data
.inesmap 0 ; mapper 0 = NROM, no bank swapping
.inesmir 1 ; background mirroring
.bank 0
.org $C000
SEI ; disable IRQs
CLD ; disable decimal mode
View chr_printer.asm
.inesprg 2 ; 2x 16KB PRG code
.ineschr 1 ; 1x 8KB CHR data
.inesmap 0 ; mapper 0 = NROM, no bank swapping
.inesmir 1 ; background mirroring
.bank 2
.org $C000
SEI ; disable IRQs
CLD ; disable decimal mode
View objectSample503933.xml
<!-- scrapi source : -->
<object href="">
<link rel="terms_of_use" href="" />
<link rel="source" href="" />
<!-- etc -->
<gallery>684</gallery> <!-- <gallery></gallery> or <gallery>Not on View</gallery> (whichever is easier) if not on view -->
<description>Christian Frederick Martin worked for Johann Georg Stauffer (1778–1853) in Vienna, rising to foreman in the factory and ultimately leaving for New York in 1833, where he set up shop on Hudson Street. He was the founder of C. F. Martin &amp; Co., the company that produced many forms of twentieth-century guitars, including the "Dreadnought." The instrument exhibited here closely resembles the Stauffer guitar (1979.390) in the Museum's collection. This guitar has a one-piece back
View yo.cpp
#include "ofApp.h"
void ofApp::writejacks(int jacks) {
ofFile file(ofToDataPath("DocumentRoot/jumpingjacks.tmp"), ofFile::WriteOnly);
file << jacks/2;
ofFile::moveFromTo(ofToDataPath("DocumentRoot/jumpingjacks.tmp"),ofToDataPath("DocumentRoot/jumpingjacks"), true, true);
void ofApp::writecalibrated(int calibrated) {
casper = require('casper').create()
casper.start '', ->
this.capture '01_mainpage.png'
# click on For Sale by Owner 'input[name="id"][value="fso"]'
casper.then ->
this.capture '02_fso.png'
find_a_path_between_two_points = (point_start, point_end) ->
return [point_start, "node_3", "node_4", "node_17", point_end]
find_a_path_between_all_points = (source, destination, rest_of_points...) ->
if(destination is null)
return source
my_full_path =
find_a_path_between_two_points(source, destination) +
find_a_path_between_all_points(destination + rest_of_points)
jedahan /
Created Apr 19, 2014
scripts to setup a raspberry pi
#!/usr/bin/env bash
### PedalPower Bootstrap
# This script will install the necessary dependencies, code and init scripts to run a pedalpower server node.
# It should only be run on a clean raspbian image, and only need to run if your config changes
### Configuration
# Set the hostname and static ip here
# Setup logfile
jedahan / download-random-image.command
Last active Aug 29, 2015
Download a random image from the metropolitan museum of art
View download-random-image.command
#!/usr/bin/env bash
[ -e jq ] || curl -O && chmod +x jq
curl -O `curl | ./jq '.image' -r`
jedahan /
Created Apr 22, 2014
post with casper!
# grab some random artwork metadata from scrapi
# filter out the title
title=`echo $artwork | jq '.title'`
# filter out the description
description=`echo $artwork | jq '.description'`
# run the script with variables
jedahan / yo-music.js
Last active Aug 29, 2015 example
View yo-music.js
var request = require('request');
var T = require("timbre");
var program = require('commander');
.option('-c, --city [city]', 'Choose your city', 'city')
var secret_key = "vNx1rFIEKAjG8YsbizTjNjVZVq4ekE5aQ64leJsr&"