This file contains hidden or 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
require 'rubygems' | |
require 'scissor' | |
n = 10 | |
infile, outfile = ARGV | |
s = Scissor(infile) / n | |
result = Scissor() | |
target = (0 .. n - 1).to_a.sort_by { rand } |
This file contains hidden or 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 | |
require 'rubygems' | |
require 'pit' | |
require 'scissor/echonest' | |
config = Pit.get('echonest.com', :require => { | |
'api_key' => 'your Echo Nest API key' | |
}) | |
Scissor.echonest_api_key = config['api_key'] |
This file contains hidden or 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
# Simple sound energy algorithm #1 | |
# http://www.gamedev.net/reference/programming/features/beatdetection/ | |
require 'rubygems' | |
require 'riff/reader' | |
file = ARGV.shift | |
class Wav | |
def initialize(riff) |
This file contains hidden or 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
package { | |
import flash.display.Sprite; | |
public class FlashTest extends Sprite { | |
public function FlashTest() { | |
// write as3 code here.. | |
// XXX | |
// YYY | |
} | |
} | |
} |
This file contains hidden or 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
// ==UserScript== | |
// @name save wonderfl changes to gist | |
// @namespace http://d.hatena.ne.jp/youpy/ | |
// @include http://wonderfl.net/code/*/edit | |
// ==/UserScript== | |
(function() { | |
if(window != window.parent) return; | |
var wonderflId = location.href.match(/([^\/]+)\/edit$/)[1]; |
This file contains hidden or 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
package { | |
import flash.media.Sound; | |
import flash.media.SoundChannel; | |
import flash.events.Event; | |
import flash.events.SampleDataEvent; | |
import flash.display.Sprite; | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.events.*; | |
import flash.media.Camera; |
This file contains hidden or 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
package { | |
import flash.display.Sprite; | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.events.*; | |
import flash.media.Camera; | |
import flash.media.Video; | |
import flash.utils.ByteArray; | |
import flash.geom.Rectangle; | |
import flash.media.Sound; |
This file contains hidden or 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
// forked from llcheesell's webcam | |
package { | |
import flash.display.Sprite; | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.events.*; | |
import flash.media.Camera; | |
import flash.media.Video; | |
import flash.utils.ByteArray; | |
import flash.geom.Rectangle; |
This file contains hidden or 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
// ==UserScript== | |
// @name soundcloud.com: append extension to download links | |
// @namespace http://d.hatena.ne.jp/youpy/ | |
// @include http://soundcloud.com/* | |
// @require http://gist.github.com/raw/3242/1a7950e033a207efcfc233ae8d9939b676bdbf46 | |
// ==/UserScript== | |
(function() { | |
function appendExtension(links) { | |
links.forEach(function(link) { |
This file contains hidden or 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
// ==UserScript== | |
// @name pretty printed grdii | |
// @namespace http://d.hatena.ne.jp/koyachi/ | |
// @include http://youpy.jottit.com/grd* | |
// @require http://gist.github.com/raw/2040/ae6c51aa5fb11eeab8e4a970102077333f5a3d06 | |
// ==/UserScript== | |
// | |
// 2008-07-23 t.koyachi | |
// inspired by http://twitter.com/hysysk/statuses/866034698 |