Skip to content

Instantly share code, notes, and snippets.

View evan's full-sized avatar

Evan Weaver evan

View GitHub Profile
@evan
evan / convert.sh
Created March 14, 2024 15:27
Convert .CHD to .BIN/.CUE in folders
#!/bin/bash
for chdfile in *.chd; do
if [[ -f "$chdfile" ]]; then
# Extract the base name without the .chd extension
base_name=$(basename "$chdfile" .chd)
# Create a directory for the .bin/.cue files
mkdir -p "$base_name"
"indexes/users": {
"ref": "indexes/users",
"class": "indexes",
"ts": 1427925219964298,
"unique": true,
"active": true,
"name": "users",
"source": "users",
"path": "class",
// create a chart
var columnChart = d4.baseChart()
var barsF = function(bar){
bar.svgFilter('feGaussianBlur', function(filter){
filter
.in("SourceGraphic")
.stdDeviation("5");
});
@evan
evan / github-hook-config.rb
Last active December 19, 2015 10:08
Enable all types of github notifications for all your github hooks.
#!/usr/bin/env ruby
require 'json'
require 'pp'
user = ENV['USER']
pass = ENV['PASS']
notifications = %w(commit_comment create delete download follow fork fork_apply gist gollum
issue_comment issues member public pull_request push team_add watch
@evan
evan / twitter2atom.rb
Created October 13, 2012 08:12
Twitter to Atom feed converter with media/conversations
require "rubygems"
require "twitter"
require "atom/pub"
Twitter.configure do |config|
config.consumer_key = ""
config.consumer_secret = ""
config.oauth_token = ""
config.oauth_token_secret = ""
end
@evan
evan / gist:1902863
Created February 24, 2012 18:40
Ccsv vs. Ruby 1.9 built-in CSV
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.1]
.. user system total real
Ccsv 0.620000 0.010000 0.630000 ( 0.623552)
CSV 9.540000 0.030000 9.570000 ( 9.559882)
# JRuby Head
Darwin winter.local 11.0.1 Darwin Kernel Version 11.0.1: Thu Jul 28 02:01:39 PDT 2011; root:xnu-1699.23.4~1/RELEASE_X86_64 x86_64
jruby 1.7.0.dev (ruby-1.8.7-p330) (2011-10-14 1f4e8fc) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_27) [darwin-x86_64-java]
RUBY_VERSION=jruby-head
Ruby 1.8.7p330
Loaded memcached 1.3.5
Loaded remix-stash 1.1.3
Loaded jruby-memcache-client 1.7.0
@evan
evan / gist:1233769
Created September 22, 2011 00:57
VM comparison for memcached client suite
## RUBY_VERSION=jruby-head
Ruby 1.8.7p330
Loaded memcached 1.3.3
Loaded remix-stash 1.1.3
Loaded jruby-memcache-client 1.7.0
Loaded dalli 1.1.2
user system total real
set: dalli:bin 10.999000 0.000000 10.999000 ( 10.999000)
set: libm:ascii 3.828000 0.000000 3.828000 ( 3.828000)
set: libm:ascii:pipeline 0.564000 0.000000 0.564000 ( 0.564000)
eweaver@winter:/Volumes/Projects/fauna/rubyspec (master)$ git pull
Already up-to-date.
eweaver@winter:/Volumes/Projects/fauna/rubyspec (master)$ rvm use 1.9.2
Using /Users/eweaver/.rvm/gems/ruby-1.9.2-p290
eweaver@winter:/Volumes/Projects/fauna/rubyspec (master)$ mspec
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.1]
................................-e:1:in `<main>': undefined method `grep' for nil:NilClass (NoMethodError)
F..................................................................................................................E.EE.....EEEEE.EEEEE.E.........................................................................E..........E........................................................................................................................................................................................................................................................................................................................................................................
@evan
evan / bbedit
Created December 9, 2010 21:03
Bash script to replace BBEdit's broken commandline functionality
#!/bin/bash
for var in "$@"
do
if [ -f "$var" ]
then
open -a BBEdit.app "$var"
else
touch "$var"
open -a BBEdit.app "$var"