Skip to content

Instantly share code, notes, and snippets.

@bytezen
bytezen / ImageTiler.py
Created August 18, 2011 17:18 — forked from sansumbrella/ImageTiler.py
Walks directory for image files and merges them into a large sheet at a fixed individual size.
#!/usr/bin/env python
# encoding: utf-8
import Image
import sys
import os
def main():
path = "where-images-may-live"
@bytezen
bytezen / resources.md
Last active August 29, 2015 14:10 — forked from teropa/resources.md

Tutorials

@bytezen
bytezen / web-servers.md
Last active September 3, 2015 04:46 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@bytezen
bytezen / .tmux.conf
Created January 9, 2016 18:57 — forked from v-yarotsky/.tmux.conf
Mac OS X tmux config
### INSTALLATION NOTES ###
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Put itunesartist and itunestrack into PATH
@bytezen
bytezen / css_colors.js
Created February 1, 2016 19:58 — forked from bobspace/css_colors.js
All of the CSS Color names as an array in javascript.
// CSS Color Names
// Compiled by @bobspace.
//
// A javascript array containing all of the color names listed in the CSS Spec.
// The full list can be found here: http://www.w3schools.com/cssref/css_colornames.asp
// Use it as you please, 'cuz you can't, like, own a color, man.
var CSS_COLOR_NAMES = ["AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","Black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGrey","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","Darkorange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkSlateGrey","DarkTurquoise","DarkViolet","DeepPink","DeepSkyBlue","DimGray","DimGrey","DodgerBlue","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Grey","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory"
@bytezen
bytezen / watch.sh
Created February 13, 2016 17:14 — forked from mikesmullin/watch.sh
watch is a linux bash script to monitor file modification recursively and execute bash commands as changes occur
#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <mike@smullindesign.com>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
#
@bytezen
bytezen / destructuring.md
Created February 25, 2017 09:07 — forked from yang-wei/destructuring.md
Elm Destructuring (or Pattern Matching) cheatsheet

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))

let
  (a,b,c) = myTuple
@bytezen
bytezen / talk.md
Created April 13, 2017 15:29 — forked from rbnpi/talk.md
Bett Show 2015 talk

Sonic Pi 2.2 at Bett 2015

This is a summary of a talk given at Bett 2015 on Sonic Pi

I started by playing excerpts from two programs, Scott Joplin Maple Leaf Rag, and a Percussion Generator, to illustrate different things Sonic Pi can do, and gave a brief description of Sonic Pi and the user interface, similar to section 1.2 of the built in tutorial, which is accessed by clicking the Help button.

I also showed how one of the example programs "Idm Breakout" could be copied and played. Then I used the following program sections to develop a code to play the round Frere Jaques

##Making sounds

@bytezen
bytezen / JazzBach.rb
Created April 13, 2017 15:39 — forked from rbnpi/JazzBach.rb
Jazz Bach converted for Sonic Pi from a MuseScore using a processing script after rearranging the piano part into 9 separate parts. Requires Sonic Pi 2.11 for run_file command. Hear it at https://soundcloud.com/scrbn/jazzbach
#Jazz Bach converted for Sonic Pi by Robin Newman Jan 2017
#requires to be used with run_file "path/to/filename/JazzBach.rb"
#using Sonic Pi 2.11 or later
use_synth :piano
s=1;r=0.1
with_fx :reverb,room: 0.8,mix: 0.5 do
with_fx :level,amp: 1.2 do #overall boost
with_fx :level do |v| #dynamic control during the piece
p=0.5;mp=0.7;mf=1;f=1.2;ff=1.5
in_thread do
@bytezen
bytezen / as_keith_midi.xtm
Created May 12, 2017 17:53 — forked from CircuV/as_keith_midi.xtm
Transscript of live performance based on Andrew Sorensen "A Study in Keith"
;;; as_keith_midi.xtm -- live performance
;; based on Andrew Sorensen "A Study in Keith" Impromptu performance
;; "A Study In Keith" is a work for solo piano (NI's Akoustik Piano)
;; by Andrew Sorensen inspired by Keith Jarrett's Sun Bear concerts.
;; Orginal code transposed to Extempore
;; http://extempore.moso.com.au
;;
;; Author: cv
;; Keywords: extempore, live-coding, impromptu, keith jarret