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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'whois' | |
module Domaing | |
def self.alliterative?(first_word, second_word) | |
first_word[0] == second_word[0] | |
end | |
def self.generate_names(words) |
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 'cl) | |
(defun swap-windows () | |
"If you have 2 windows, it swaps them." | |
(interactive) | |
(cond ((not (= (count-windows) 2)) | |
(message "You need exactly 2 windows to do this.")) | |
(t | |
(let* ((w1 (first (window-list))) | |
(w2 (second (window-list))) |
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
➜ ~ gem install heroku | |
Fetching: heroku-2.4.0.gem (100%) | |
Successfully installed heroku-2.4.0 | |
1 gem installed |
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
➜ ~ heroku apps:create --stack cedar my-project | |
Creating my-project... done, stack is cedar | |
http://my-project.herokuapp.com/ | [email protected]:my-project.git |
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
➜ my-project git:(master) ✗ git push heroku master | |
Counting objects: 7, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (4/4), done. | |
Writing objects: 100% (4/4), 459 bytes, done. | |
Total 4 (delta 2), reused 0 (delta 0) | |
-----> Heroku receiving push | |
-----> Ruby/Rails app detected | |
-----> Detected Rails is not set to serve static_assets |
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
commit 11dce2502c111ff9ae73f95dde89f27d0f84416a | |
Author: Eric Himmelreich <[email protected]> | |
Date: Fri Sep 16 10:53:49 2011 -0400 | |
break arrow keys habit, I already know the emacs bindings for moving | |
Modified eric/bindings.el | |
diff --git a/eric/bindings.el b/eric/bindings.el | |
index 9915c7e..bb9d4fc 100644 | |
--- a/eric/bindings.el |
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 scratch-js () | |
"Create or switch to a javascript mode scratch buffer" | |
(interactive) | |
(if (not (eq nil (get-buffer "scratch-js"))) | |
(switch-to-buffer "scratch-js") | |
(set-buffer (get-buffer-create "scratch-js")) | |
(js2-mode) | |
(switch-to-buffer "scratch-js"))) |
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 | |
wget -O - http://someonewhocares.org/hosts/hosts > /tmp/hosts | |
cat /usr/local/etc/hosts >> /tmp/hosts | |
cp -av /etc/hosts /etc/hosts.orig | |
cp -av /tmp/hosts /etc/hosts |
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
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
(add-to-list 'auto-mode-alist '("\\.json$" . js2-mode)) | |
;; Use js-mode indentation in js2-mode, I don't like js2-mode's indentation | |
;; | |
;; thanks http://mihai.bazon.net/projects/editing-javascript-with-emacs-js2-mode | |
;; with my own modifications | |
;; | |
(defun my-js2-indent-function () |
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 scratch-js () | |
"Create or switch to a javascript mode scratch buffer" | |
(interactive) | |
(if (not (eq nil (get-buffer "scratch-js"))) | |
(switch-to-buffer "scratch-js") | |
(set-buffer (get-buffer-create "scratch-js")) | |
(js2-mode) | |
(switch-to-buffer "scratch-js"))) |