This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import re | |
text = """1st your name. | |
2nd an article of clothing. | |
3rd a flowering plant. | |
4th a piece of furniture. | |
5th a machine. | |
6th a bicycle/velocipede. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><title>Day 6 (velocipede)</title><head> | |
<style> body { background: -webkit-canvas(velocipede); width:100%; height:100%; }</style> | |
<script type="text/javascript"> | |
var ctx = document.getCSSCanvasContext("2d", "velocipede", 60, 60); | |
ctx.strokeStyle = 'rgba(0,0,0,0)'; | |
ctx.lineCap = 'butt'; | |
ctx.lineJoin = 'miter'; | |
ctx.miterLimit = 4; | |
ctx.fillStyle = "#000000"; | |
ctx.strokeStyle = "rgba(0, 0, 0, 0)"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load jetty transport | |
http.type: com.sonian.elasticsearch.http.jetty.JettyHttpServerTransportModule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Save a record, directly to elasticsearch | |
* @param {Object} record Record to be saved | |
* @param {String} index_name Index to save to | |
* @param {String} type type to save to | |
* @param {Function} callback called on complete: req, result | |
* @param {String} prefix url for DB ('http://localhost:9200/') | |
*/ | |
exports.save = function(record, index_name, type, callback, prefix, id){ | |
prefix = prefix || 'http://localhost:9200/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerAdmin konsumer@metaltoad.com | |
VirtualDocumentRoot "/Users/konsumer/Sites/%1/webroot/" | |
DocumentRoot "/Users/konsumer/Sites/%1/webroot/" | |
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon | |
ErrorLog "/var/log/apache2/vhosts-error_log" | |
CustomLog "/var/log/apache2/vhosts-access_log" vcommon | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hid hi; | |
HidMsg msg; | |
hi.openKeyboard( 0 ); | |
Sitar sit => PRCRev r => dac; | |
fun void pluk( int code ) { | |
Math.random2( 0, 11 ) => float winner; | |
Std.mtof( 57 + Math.random2(0,3) * 12 + winner ) => sit.freq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int analogPin = 3; | |
int val = 0; | |
void setup() { | |
Serial.begin(9600); // setup serial | |
} | |
void loop() { | |
val = analogRead(analogPin); // read the input pin | |
Serial.println(val); // debug value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var firmata = require('firmata'); | |
var analogPin = 3; | |
var board = new firmata.Board('/dev/tty.usbmodemfd121', function(err) { | |
if (err){ | |
console.log(err); | |
process.exit(1); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
path_list=`echo $PATH | tr ':' ' '` | |
for d in $path_list | |
do | |
ls $d | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
console.log("sup, dude?"); |
OlderNewer