Skip to content

Instantly share code, notes, and snippets.

View rosstimson's full-sized avatar

Ross Timson rosstimson

View GitHub Profile
/*
---
name: guilloche
script: guilloche.js
description: guilloche
provides: [Guilloche]
...
*/
@tenderlove
tenderlove / person_test.rb
Created February 10, 2011 23:04
Use minitest/spec with Rails 3
require 'test_helper'
require 'minitest/autorun'
module Tenderlove
class Spec < MiniTest::Spec
include ActiveSupport::Testing::SetupAndTeardown
include ActiveRecord::TestFixtures
alias :method_name :__name__ if defined? :__name__
self.fixture_path = File.join(Rails.root, 'test', 'fixtures')
@mirisuzanne
mirisuzanne / tutorial.mkdn
Created August 22, 2011 20:37
A new Susy tutorial

Susy 0.9 Tutorial

See the official Susy site for 1.0 documentation.

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

Building a Susy Grid

@mbbx6spp
mbbx6spp / README.md
Last active May 26, 2024 23:00
Retaining Git history of subdirectory from parent repository

Subdirectory Git Repository

This is a mini howto on moving a subdirectory to its own repository retaining history

Howto

Assume PARENT is the original parent Git repository (locally) and CHILD is the new local repository that you wish to create from a subdirectory, retaining all of its history from the PARENT repository; PARENT_PATH and CHILD_PATH are the paths to PARENT and CHILD respectively; SUBDIR is the relative path within the repository under extraction:

  1. git clone --no-hardlinks PARENT_PATH CHILD_PATH
  2. pushd CHILD_PATH
@nathanharper
nathanharper / tmux_irssi_niclist.sh
Last active October 29, 2018 08:39
A quick attempt to automate opening up a tmux session with Irssi and its nicklist.pl running.
#!/usr/bin/env bash
# This should work whether you are already in a TMUX session or not...
# Irssi directory is assumed to be in the user's home dir
if [ -z "$TMUX" ]
then
tmux new-session -d -s ircuser
tmux split-window -tircuser -h -l20
tmux send-keys -tircuser "tmux send-keys -t0 \"irssi\" C-m; \
tmux send-keys -t0 \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" C-m; \
tmux send-keys -t0 \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" C-m; \
@rottenbytes
rottenbytes / pkgng.rb
Created September 5, 2012 08:29
chef+pkgng
require 'chef/mixin/shell_out'
require 'chef/platform'
require 'chef'
include Chef::Mixin::ShellOut
class Chef
class Provider
class Package
class Pkgng < Chef::Provider::Package
@xaviershay
xaviershay / rewrite.rb
Created January 10, 2013 06:11
Proof-of-concept squid proxy settings for proxying http://rubygems.org/ Tested on one project on my local machine both cold, and warm with internet turned off.
#!/usr/bin/env ruby
# url rewriter for rubygems squid proxy
STDOUT.sync = true
while line = gets
url = line.split(' ')[0]
# Cargo-culted this conditional, not sure if it is necessary
response = if url
@wandernauta
wandernauta / sp
Last active July 10, 2024 07:57
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@ryancragun
ryancragun / gist:9744804
Created March 24, 2014 17:18
Amazon Linux RightLink install
#!/usr/bin/env sh
# import RightScale key
curl -Ss 'https://s3.amazonaws.com/rightscale_key_pub/rightscale_key.pub' > /etc/pki/rpm-gpg/RPM-GPG-KEY-rightscale
gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-rightscale
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rightscale
# add Epel repo
cat >/etc/yum.repos.d/Epel.repo<<-'EOF'
[epel-mirror]
@petere
petere / _kitchen
Created April 9, 2014 19:49
zsh completion for test-kitchen
#compdef kitchen
_kitchen() {
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments '1: :->cmds'\
'2: :->args'
case $state in