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
# If you wonder why we implement this class, it's because StringInquirer has a bug | |
# since it inherits from String, so if you ask for all? then it always returns true | |
class Inquirer | |
def initialize(value) | |
@value = value.to_s | |
end | |
def method_missing(method_name, *arguments) | |
if method_name.to_s[-1,1] == "?" | |
self == method_name.to_s[0..-2] |
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
(defun ruby-generate-tags() | |
(interactive) | |
(let ((root (ffip-project-root))) | |
(let ((my-tags-file (concat root "TAGS"))) | |
(message "Regenerating TAGS file: %s" my-tags-file) | |
(if (file-exists-p my-tags-file) | |
(delete-file my-tags-file)) | |
(shell-command | |
(format "find %s -iname '*.rb' | grep -v db | xargs ctags -a -e -f %s" | |
root my-tags-file)) |
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
# Install with: | |
# bash < <(curl -L https://gist.github.com/raw/1688474) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem |
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
Efficient moving | |
Ctrl-a Move to the start of the line. | |
Ctrl-e Move to the end of the line. | |
Ctrl-b Move back one character. | |
Alt-b Move back one word. | |
Ctrl-f Move forward one character. | |
Alt-f Move forward one word. |
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
cat Procfile | |
web: tar xzf emacs.tar.gz && ln -s $PWD/emacs /tmp/emacs; emacs/bin/emacs --daemon --load init.el | |
heroku ps | |
Process State Command | |
------- --------------- ------------------------------------ | |
web.1 crashed for 51s tar xzf emacs.tar.gz && ln -s $PWD.. | |
;;; init.el | |
(require 'elnode (concat load-file-name "elnode.el")) |
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
diff --git a/methods/el-get-elpa.el b/methods/el-get-elpa.el | |
index 02cb694..296c1ed 100644 | |
--- a/methods/el-get-elpa.el | |
+++ b/methods/el-get-elpa.el | |
@@ -30,11 +30,10 @@ | |
PACKAGE isn't currently installed by ELPA." | |
(when (package-installed-p package) | |
(let ((package-name (el-get-as-string package)) | |
- (package-version (package-desc-vers (assq package package-alist)))) | |
+ (package-version (package-desc-vers (cdr (assq package package-alist))))) |
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
xing_dir="/Users/jorge.dias/development/xing" | |
function cx () { | |
if [ -n $1 ]; then | |
cd "$xing_dir/$1" | |
else | |
cd $xing_dir | |
fi | |
} |
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
# Does not work because of a broken symlink in the dmg | |
#dropbox: | |
# package: Dropbox | |
# volume_dir: Dropbox Installer | |
# url: "http://www.dropbox.com/download?plat=mac" | |
chrome: | |
package: "Google Chrome" | |
url: "https://dl-ssl.google.com/chrome/mac/stable/GGRM/googlechrome.dmg" |
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
;;; ruby-mode.el --- Major mode for editing Ruby files | |
;; Copyright (C) 1994-2008 Yukihiro Matsumoto, Nobuyoshi Nakada | |
;; Authors: Yukihiro Matsumoto, Nobuyoshi Nakada | |
;; URL: http://www.emacswiki.org/cgi-bin/wiki/RubyMode | |
;; Created: Fri Feb 4 14:49:13 JST 1994 | |
;; Keywords: languages ruby | |
;; Version: 1.1 |
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
complete -C `which xing_autocompletion` -o default xing | |
xing_dir="/Users/jorge.dias/development/xing" | |
function cx () { | |
if [ -n $1 ]; then | |
cd "$xing_dir/$1" | |
else | |
cd $xing_dir | |
fi |