Skip to content

Instantly share code, notes, and snippets.

View jedahan's full-sized avatar
💀
.

Jonathan Dahan jedahan

💀
.
View GitHub Profile
.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
RESET:
SEI ; disable IRQs
CLD ; disable decimal mode
.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
RESET:
SEI ; disable IRQs
CLD ; disable decimal mode
<!-- scrapi source : http://scrapi.org/object/61512 -->
<object href="http://www.metmuseum.org/Collections/search-the-collections/503933.xml">
<link rel="terms_of_use" href="http://www.metmuseum.org/information/terms-and-conditions" />
<link rel="source" href="http://www.metmuseum.org/Collections/search-the-collections/503933" />
<title>Guitar</title>
<id>503933</id>
<!-- 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
#include "ofApp.h"
void ofApp::writejacks(int jacks) {
ofFile file(ofToDataPath("DocumentRoot/jumpingjacks.tmp"), ofFile::WriteOnly);
file << jacks/2;
file.close();
ofFile::moveFromTo(ofToDataPath("DocumentRoot/jumpingjacks.tmp"),ofToDataPath("DocumentRoot/jumpingjacks"), true, true);
}
void ofApp::writecalibrated(int calibrated) {
casper = require('casper').create()
casper.start 'https://post.craigslist.org/c/nyc?lang=en', ->
this.capture '01_mainpage.png'
# click on For Sale by Owner
this.click '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
jedahan / bootstrap.sh
Created April 19, 2014 15:27
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
jedahan / download-random-image.command
Last active August 29, 2015 14:00
Download a random image from the metropolitan museum of art
#!/usr/bin/env bash
[ -e jq ] || curl -O http://stedolan.github.io/jq/download/osx32/jq && chmod +x jq
curl -O `curl scrapi.org/random?images=true | ./jq '.image' -r`
@jedahan
jedahan / yo.sh
Created April 22, 2014 23:15
post with casper!
# grab some random artwork metadata from scrapi
artwork=`curl scrapi.org/random?images=true`
# filter out the title
title=`echo $artwork | jq '.title'`
# filter out the description
description=`echo $artwork | jq '.description'`
# run the script with variables
@jedahan
jedahan / yo-music.js
Last active August 29, 2015 14:00
data.gov example
var request = require('request');
var T = require("timbre");
var program = require('commander');
program
.version('0.0.1')
.option('-c, --city [city]', 'Choose your city', 'city')
.parse(process.argv);
var secret_key = "vNx1rFIEKAjG8YsbizTjNjVZVq4ekE5aQ64leJsr&"