- Install stud
$ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
- Download and install the powssl script
$ curl https://gist.githubusercontent.com/paulnicholson/2050941/raw/7e4d2178e3733bed18fdfe737277c3cb72241d39/powssl > ~/bin/powssl
$ chmod +x ~/bin/powssl
- Run powssl to create development certificate and configure stud.
$ powssl
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
# Install pow | |
$ curl get.pow.cx | sh | |
# Install powder | |
$ gem install powder | |
# See that firewall is fucked | |
$ sudo ipfw show | |
00100 0 0 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in <- THIS ONE!!! | |
65535 81005 28684067 allow ip from any to any |
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 | |
# Set up the environment. Respect $DISTRIB_CODENAME if it's set. | |
. /etc/lsb-release | |
# Fail fast if we're not on Lucid or Oneiric. | |
if [ $UID != 0 ]; then | |
echo "You are not root. Installing a package needs root privileges." | |
exit 1 | |
fi |
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 | |
#/ Usage: clean-merged-branches [-f] | |
#/ Delete merged branches from the origin remote. | |
#/ | |
#/ Options: | |
#/ -f Really delete the branches. Without this branches are shown | |
#/ but nothing is deleted. | |
set -e | |
# show usage maybe |
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
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = 'parallel_assets_compiler' | |
s.version = '0.2.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Jørgen Orehøj Erichsen' | |
s.email = '[email protected]' | |
s.summary = 'Compile assets in parallel' | |
s.description = 'Compile assets in parallel to speed up deployment' |
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
(defun cofi/helm-flyspell-correct () | |
"Use helm for flyspell correction. | |
Adapted from `flyspell-correct-word-before-point'." | |
(interactive) | |
;; use the correct dictionary | |
(flyspell-accept-buffer-local-defs) | |
(let ((cursor-location (point)) | |
(word (flyspell-get-word)) | |
(opoint (point))) |
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 'parallel' # gem install parallel (https://github.com/grosser/parallel) | |
# Monkey patch to Sprockets::StaticCompiler, a class provided by actionpack | |
# that's used by the assets:precompile task. This patch uses the Parallel gem | |
# to parallelize asset compilation in the simplest way possible. | |
# | |
# Parallel wraps Process.fork to handle things like inter-process communication | |
# via pipes and determining the maximum number of processes to run based on | |
# your system's total logical processors. So far only tested on MRI 1.9.3 on OS X. | |
module Sprockets |
convert image.png -resize 40 txt:-|sed -E 's/://;s/\( ? ?//;s/, ? ?/,/g;s/\)//;s/([0-9]+,[0-9]+,[0-9]+),[0-9]+/\1/g;s/255/254/g;/mage/d'|awk '{print $1,$2}'|sed -E 's/^0,[0-9]+ /print "echo;tput setaf "\;/;s/^[0-9]+,[0-9]+ /print "tput setaf ";/;s/(.+),(.+),(.+)/\1\/42.5*36+\2\/42.5*6+\3\/42.5+16/'|bc|sed 's/$/;echo -n " ";/'|tr '\n' ' '|sed 's/^/tput rev;/;s/; /;/g;s/$/tput sgr0;echo/'|bash
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
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = 'https://hooks.slack.com/services/XXXX/XXXXX/XXXXXX'; | |
const slack_req_opts = url.parse(slack_url); | |
const slack_channel = '@user_name'; //or channel name | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; | |
exports.handler = function(event, context, callback) { |