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/sh | |
# | |
# Create a quicktime movie that combines a looping animated gif with an mp3. The resulting movie will | |
# be the same length as the audio file. | |
# | |
if [ $(( $# - $OPTIND )) -lt 4 ]; then | |
echo "Usage: $0 input.gif input.mp3 output.mov [framerate] [resolution]" | |
exit 1 | |
fi |
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/sh | |
# | |
# Remove spaces from the names of all files in the current directory | |
# | |
ls -1 | while read file; do new_file=$(echo $file | sed s/\ //g); mv "$file" "$new_file"; 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v2.min.js"></script> | |
</head> | |
<body> | |
<div role="main"> | |
<div class="charts"></div> | |
<script language="JavaScript"> |
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 ruby | |
# | |
# Ruby methods for protecting against timing attacks | |
# | |
module ExpressionTimer | |
# a shortcut to ExpressionTimer.send that passes in the object for which this module | |
# was included | |
# |
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 ruby | |
# | |
# vidsampler – extract audio samples from online video | |
# | |
# for OSX only | |
# | |
# Usage: | |
# | |
# ruby vidsampler.rb [youtube url] [minute:second] [duration] | |
# |
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 ruby | |
# this is a test of ruby-processing (https://github.com/jashkenas/ruby-processing) where | |
# captured video is written to a QuickTime file | |
# use "rp5 unpack library" at a command line to install the video library if you haven't | |
# tested with Ruby 1.9.2 on OSX with built in web cam | |
class VideoCaptureToFileTest < Processing::App |
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 ruby | |
# only show pixels that pass a certain threshold of color saturation | |
class SaturationFilter < Processing::App | |
load_library :video | |
include_package "processing.video" | |
def setup |
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 ruby | |
# this is a test of ruby-processing (https://github.com/jashkenas/ruby-processing) with video capture | |
# use "rp5 unpack library" at a command line to install the video library, among others | |
# tested with Ruby 1.9.2 on OSX with built in web cam | |
class VideoCaptureTest < Processing::App |
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 ruby | |
# this is a test of ruby-processing (https://github.com/jashkenas/ruby-processing) with the video library | |
# use "rp5 unpack library" at a command line to install the video library, among others | |
# tested with Ruby 1.9.2 | |
# video file: http://bit.ly/H5yBjK | |
class VideoTest < Processing::App |
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
kern.sysv.shmmax=1938751488 | |
kern.sysv.shmmin=1 | |
kern.sysv.shmmni=256 | |
kern.sysv.shmseg=64 | |
kern.sysv.shmall=1938751488 |