This file contains hidden or 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
source 'https://rubygems.org' | |
gem 'airbrake' | |
gem 'bourbon' | |
gem 'coffee-rails' | |
gem 'delayed_job_active_record', '>= 4.0.0' | |
gem 'email_validator' | |
gem 'flutie' | |
gem 'high_voltage' | |
gem 'jquery-rails' |
This file contains hidden or 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
source 'https://rubygems.org' | |
# Ruby Version on Heroku | |
ruby '2.0.0' | |
# Puma (App server) | |
gem 'puma' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.0.0' |
This file contains hidden or 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
// ==UserScript== | |
// @name Github Wiki Search | |
// @description Search wiki of the repository on Github. | |
// @namespace linyows | |
// @include https://github.com/* | |
// @namespace http://userscripts.org/scripts/show/129930 | |
// @author linyows <[email protected]> | |
// @version 1.4.0 | |
// ==/UserScript== |
This file contains hidden or 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
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/5834741/raw/grablinks.js?x="+(Math.random());})(); |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# SearchLink 2.1.0 by Brett Terpstra 2014 (http://brettterpstra.com) | |
# Free to use and modify, please maintain attribution | |
require 'net/https' | |
require 'shellwords' | |
require 'yaml' | |
require 'rubygems' | |
require 'json' | |
require 'cgi' |
This file contains hidden or 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
## Exclude VM instances and download cache in Ubuntu Multipass on Mac OS from Time Machine backup | |
## Once you added them to the exclusion list they will show up in the Time Machine prefpane exclusion dialog. | |
sudo tmutil addexclusion -p /var/root/Library/Application\ Support/multipassd/vault/instances/ | |
sudo tmutil addexclusion -p /var/root/Library/Caches/multipassd/ |
This file contains hidden or 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
# How to serializer Sawyer::Resource object to json? | |
# https://github.com/lostisland/sawyer/issues/34 | |
require 'json' | |
sawyer_resource.map(&:to_h).to_json |
This file contains hidden or 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
#### Remove YAML frontmatter. Requires GNU sed. OSX sed doesn't seem to work. | |
gsed '1 { /^---/ { :a N; /\n---/! ba; d} } | |
#### Remove '#' comments, empty lines and leading/trailing spaces | |
sed 's/#.*$// | |
s/[[:space:]]//g | |
/^$/d' | |
This file contains hidden or 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 | |
# Homebrew doesn't remember which formulas are installed by user and | |
# which are installed as dependancies, and it doesn't uninstall dependancies | |
# when you uninstall a formula. | |
# | |
# This script will how you find orphaned formulas that were insatlled as dependecies | |
# but no londer needed because you've unsintalled the parent packages. | |
# | |
# Usage: |
This file contains hidden or 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
#### jq: sort by key value | |
jq '. | sort_by(.name)' | |
# Input | |
# [{name: "casey","age":54}, {"name": "Mary", "age":31}, {"name": "John", "age":20}] | |
# Output: | |
# [{"name": "John", "age": 20}, {"name": "Mary", "age":31}.{"name": "casey", "age":54}] | |
#### jq: filter by key value |