Brainstorming a friendlier find(1).
Goals:
This installs a patched ruby 1.9.3-p385 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
# Update the status bar by fetching an environment variable set earlier by a shell script. | |
# Requires Thomas Adam's hook patch for tmux | |
# https://github.com/ThomasAdam/tmux/tree/ta/hooks | |
set-hook -g -n 'after-select-window' 'run "tmux set -q status-left \"`tmux show -environment TMUX_STATUS_#I | cut -c 15-`\""' | |
set-hook -g -n 'after-kill-window' 'run "tmux set -q status-left \"`tmux show -environment TMUX_STATUS_#I | cut -c 15-`\""' |
## | |
# test/spec/mini 5 | |
# http://gist.github.com/307649 | |
# chris@ozmm.org | |
# | |
def context(*args, &block) | |
return super unless (name = args.first) && block | |
require 'test/unit' | |
klass = Class.new(defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase) do | |
def self.test(name, &block) |
#Council of Chiefs
9:00PM November 3, 2012
Camp Lazarus
4422 Columbus Pike
Delaware, OH 43015
Goal of the Meeting: To make decisions regarding the specifics of Conclave 2013
#!/usr/bin/env ruby | |
# checkout the readme from the master branch | |
`git checkout gh-pages; git checkout master README.md` | |
path = `pwd`.gsub(/\n/, "") | |
readme_path = File.join(path, "README.md") | |
index_path = File.join(path, "index.md") | |
# write the index readme file |
# requires root permissions in /usr/bin/ | |
star = String.new | |
8.times { star += "*" } | |
Star = "\n#{star * 3}\n" | |
def newblock string | |
puts "\n#{Star}#{string}#{Star}\n" | |
end |
# Updated version is always at: https://gist.github.com/febuiles/1549991 | |
#!/bin/bash | |
artist=`osascript -e'tell application "iTunes"' -e'get artist of current track' -e'end tell'` | |
title=`osascript -e'tell application "iTunes"' -e'get name of current track' -e'end tell'` | |
song=`curl -s --get "https://makeitpersonal.co/lyrics" --data-urlencode "artist=$artist" --data-urlencode "title=$title"` | |
echo -e "$artist - $title\n$song" |
This is a response for one of our apprentices who wanted to learn more about how structs work.
Part of this is a response and part of it a challenge. If you are only interested in the challenge clone the repo and run rake (more detailed instructions here).