This file contains 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
everywhere=$(ag '^\s*require' -w --ruby --no-numbers --ignore=test/ --ignore=tasks/ --ignore=scripts/ | awk -F: '{gsub(/^ */, "", $2); print $2}' | sort | uniq) | |
shotgun=$(ag '^\s*require' -w --no-numbers shotgun.rb) | |
echo "$everywhere" | grep -v -f <(echo "$shotgun") |
This file contains 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
cat $1 | | |
tr '[:upper:]' '[:lower:]' | | |
sed -e 's/^\.//' | | |
sed -e 's/\.con$/.com/' | | |
sed -e 's/\.con\.ar$/.com.ar/' | | |
sed -e 's/^www//' | | |
sed -e 's/^\+//' | | |
sed -e 's/@@/@/' | | |
sort | | |
uniq | |
This file contains 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
#! /bin/bash | |
# Creates passwords of the given length, all lower case for easier input on mobile devices. | |
length="${1:-24}" | |
password=$(openssl rand -base64 $(($length + 50)) | tr -Cd '[:lower:]' | cut -c 1-$(($length))) | |
echo "$password" | pbcopy | |
echo "$password" |
This file contains 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
git checkout master | |
git gc | |
git remote | while read remote; do | |
git remote prune $remote | |
done | |
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d |
This file contains 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
# cuba/mote tries to require mote, but we already | |
# provide hmote. | |
$LOADED_FEATURES << "mote.rb" | |
require "hmote" | |
require "cuba/mote" |
This file contains 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
#!/bin/sh | |
# | |
# Adam Sharp | |
# Aug 21, 2013 | |
# | |
# Usage: Add it to your PATH and `git remove-submodule path/to/submodule`. | |
# | |
# Does the inverse of `git submodule add`: | |
# 1) `deinit` the submodule | |
# 2) Remove the submodule from the index and working directory |
This file contains 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
# Hook it up to your favorite testing framework: | |
# | |
# module MiniTest | |
# def self.filter_backtrace(bt) | |
# Backtrace.filter(bt) | |
# end | |
# end | |
module Backtrace | |
NOISE = Gem.path + $LOAD_PATH |
This file contains 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
git clone https://gist.github.com/djanowski/cfc662d64585b284db9c disque-crash | |
cd disque-crash | |
make |
This file contains 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
module Syro::Render | |
HTML = "text/html; charset=utf-8".freeze | |
TEMPLATES = {} | |
def page(path) | |
template(path, "layout") | |
end | |
def template(path, layout = nil) | |
TEMPLATES[[path, layout]] ||= begin |
This file contains 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 "hmote" | |
class Page | |
include HMote::Helpers | |
attr_accessor :path | |
attr_accessor :layout | |
attr_accessor :params | |
def initialize(path, layout = nil) |
OlderNewer