Skip to content

Instantly share code, notes, and snippets.

View BinaryMuse's full-sized avatar
🏳️‍🌈
Just gayin' up the place the best I can

Michelle Tilley BinaryMuse

🏳️‍🌈
Just gayin' up the place the best I can
View GitHub Profile
@BinaryMuse
BinaryMuse / kinetic.bezier.js
Created September 16, 2012 04:15 — forked from gzoller/kinetic.bezier.js
Kinetic Plug-Ins
/**
* KineticJS Bezier Extension
* Compatible with KineticJS JavaScript Library v3.8.0
* Author: Greg Zoller
* Date: Apr 12 2012
*/
///////////////////////////////////////////////////////////////////////
// Bezier
///////////////////////////////////////////////////////////////////////
@BinaryMuse
BinaryMuse / gist:3231471
Created August 1, 2012 23:14 — forked from swannodette/gist:3217582
sudoku_compact.clj
(ns sudoku
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
(defn get-square [rows x y]
(for [x (range x (+ x 3))
y (range y (+ y 3))]
(get-in rows [x y])))
(defn init [vars hints]
@BinaryMuse
BinaryMuse / application.js
Created February 15, 2012 20:21 — forked from lachie/application.js
rails 3.1 asset pipeline + stitch/CommonJS
// in app/assets/javascripts/application.js
//= require jquery
//= require jquery_ujs
//= require ./stitch_header
//= require_tree .
@BinaryMuse
BinaryMuse / gist:1692713
Created January 28, 2012 05:00 — forked from tiembo/gist:1680416
Ubuntu laptop A/C unplugging suspend fix
# run in command line
gsettings set org.gnome.settings-daemon.plugins.power 'use-time-for-policy' 'false'
@BinaryMuse
BinaryMuse / convert_songs.rb
Created April 22, 2011 21:32
Convert a directory (and subdirectories) full of .flac files to .mp3 using ffmpeg
require 'find'
def convertFile(path)
puts "Converting #{path}"
choppedSafeFilePath = path.chomp(File.extname(path))
`ffmpeg -i "#{choppedSafeFilePath}.flac" -ar 44100 -ab 128k -y "#{choppedSafeFilePath}.mp3" 2>/dev/null`
end
Find.find("/media/New Volume/song_directory") do |path|
if File.extname(path) == ".flac"
convertFile path
require 'coderay'
codeToHighlight = `pbpaste`
highlightedCode = CodeRay.scan(codeToHighlight, :ruby).div
IO.popen("pbcopy", mode='w') do |io|
io.write highlightedCode
end