Skip to content

Instantly share code, notes, and snippets.

View halfbyte's full-sized avatar
🌍
Doing stuff

Jan Krutisch halfbyte

🌍
Doing stuff
View GitHub Profile
@halfbyte
halfbyte / gist:6636966
Created September 20, 2013 12:48
A patch for liv3c0der I used (in slightly modified form) at JSConf.eu 2013 and onGameStart 2013.
// NAME: finalist
AE.Instance.tempo = 135;
AE.Instance.groove = 0.3;
function draw(c, s) {
LC.cls(c)
}
// context, outlet, times, time per step, state, data
// should return array of functions that accept a single argument: the time
function pattern(c, o, t, l, s, d) {
var i;
@halfbyte
halfbyte / middle.js
Created September 20, 2013 12:46
A patch for liv3c0der, used at JSConf.eu 2013 and before my talk at onGameStart 2013.
// NAME: middle
function draw(c, s) {
LC.cls(c)
}
// context, outlet, times, time per step, state, data
// should return array of functions that accept a single argument: the time
function pattern(c, o, t, l, s, d) {
var i;
var ll=t.length;
@halfbyte
halfbyte / audio_example.html
Created January 14, 2013 18:40
A very simple audio demo.
<html>
<head>
<title>HTML5 BUG Audio Example</title>
</head>
<style type="text/css">
#play { font-size: 3em;}
</style>
<script type="text/javascript">
(function(){
@halfbyte
halfbyte / gist:3988686
Created October 31, 2012 17:55
j.mp-resolution probs
> dig j.mp @213.191.92.87 master [0e40681]
; <<>> DiG 9.8.3-P1 <<>> j.mp @213.191.92.87
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6092
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;j.mp. IN A
@halfbyte
halfbyte / ploppconvert.rb
Created July 6, 2012 15:56
ploppcast conversion
input = ARGV[0]
output = ARGV[1]
unless input && output
puts "usage IN OUT" and exit
end
system "ffmpeg -i '#{input}' -map 0:0 -vn -acodec copy #{output}-1.m4a -map 0:1 -vn -acodec copy #{output}-2.m4a"
@halfbyte
halfbyte / speaker.md
Created June 22, 2012 14:22 — forked from matiaskorhonen/speaker.md
Frozen Rails Talk Proposal Template (http://2012.frozenrails.eu/)
@halfbyte
halfbyte / data.html
Created May 28, 2012 16:49
A deserializer to initialize Backbone Collections from HTML.
<ul class="books">
<li>
<h3>Practical Arduino</h3>
<dl class="metadata">
<dt>ISBN:</dt>
<dd class="isbn">978foobar</dd>
<dt>Authors</dt>
<dd class="creator">Jonathan Oxer, Hugh Blemings</dd>
<dt>Created:</dt>
<dd class="created-at" data-date="2011-01-01">January 1st, 2011</dd>
@halfbyte
halfbyte / test.html
Created August 19, 2011 21:21
Small hack to test MediaElementSourceNode
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Web Audio Reading</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Jan Krutisch">
<!-- Date: 2011-08-19 -->
<script type="text/javascript" charset="utf-8">
RestKitNetwork
/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h
/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h:62: error: expected specifier-qualifier-list before 'UIBackgroundTaskIdentifier'
/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h:113: error: expected specifier-qualifier-list before 'UIBackgroundTaskIdentifier'
file://localhost/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h: error: Parse Issue: Unknown type name 'UIBackgroundTaskIdentifier'
file://localhost/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h: error: Parse Issue: Unknown type name 'UIBackgroundTaskIdentifier'
RestKitNetwork
/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h
/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h:62: error: expected specifier-qualifier-list before 'UIBackgroundTaskIdentifier'
/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h:113: error: expected specifier-qualifier-list before 'UIBackgroundTaskIdentifier'
file://localhost/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h: error: Parse Issue: Unknown type name 'UIBackgroundTaskIdentifier'
file://localhost/Users/jankrutisch/cocoa/RestKit/Code/Network/RKRequest.h: error: Parse Issue: Unknown type name 'UIBackgroundTaskIdentifier'