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
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |
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
" Vim functions to run RSpec and Cucumber on the current file and optionally on | |
" the spec/scenario under the cursor. | |
function! RailsScriptIfExists(name) | |
" Bundle exec | |
if isdirectory(".bundle") || (exists("b:rails_root") && isdirectory(b:rails_root . "/.bundle")) | |
return "bundle exec " . a:name | |
" System Binary | |
else | |
return a:name |
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
"""Download stories of a Pivotal Tracker project. | |
You need the project ID (an int) and your API token. The latter can be | |
obtained in ``https://www.pivotaltracker.com/profile``, or using curl:: | |
$ curl -u username:password -X GET https://www.pivotaltracker.com/services/v3/tokens/active | |
""" | |
import getpass | |
import pickle |
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
# features/support/paths.rb | |
module NavigationHelpers | |
# Maps a name to a path. Used by the | |
# | |
# When /^I go to (.+)$/ do |page_name| | |
# | |
# step definition | |
# | |
def path_to(page_name) | |
case page_name |
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
# features/support/paths.rb | |
module NavigationHelpers | |
# Maps a name to a path. Used by the | |
# | |
# When /^I go to (.+)$/ do |page_name| | |
# | |
# step definition | |
# | |
def path_to(page_name) | |
case page_name |
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 'term) | |
(defun visit-ansi-term () | |
"If the current buffer is: | |
1) a running ansi-term named *ansi-term*, rename it. | |
2) a stopped ansi-term, kill it and create a new one. | |
3) a non ansi-term, go to an already running ansi-term | |
or start a new one while killing a defunt one" | |
(interactive) | |
(let ((is-term (string= "term-mode" major-mode)) | |
(is-running (term-check-proc (buffer-name))) |
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 DeBouncer | |
def self.extened(base) | |
class << base | |
@deboucner_module = nil | |
end | |
end | |
def debounce(method_name, time) | |
if @debouncer_module | |
@debouncer_module.create_debouncer(method_name, time) |
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
AllCops: | |
RunRailsCops: true | |
Excludes: | |
- db/** | |
HashSyntax: | |
Description: 'Use either hash rocket or 1.9 styled hashes.' | |
Enabled: false | |
LineLength: |
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
configuration: | |
(require 'robe) | |
(add-hook 'enh-ruby-mode-hook 'robe-mode) | |
Usage: | |
I have noticed that when inf-ruby mode loads pry it just hangs because of | |
pry trying to be smart about determining terminal type. It is | |
not a problem with robe per se, but the fact that pry is unusable from |
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
(setq enh-ruby-program "/home/gnufied/.rbenv/versions/1.9.3-p448/bin/ruby") | |
(autoload 'enh-ruby-mode "enh-ruby-mode" "Major mode for ruby files" t) | |
(add-to-list 'auto-mode-alist '("\\.rb$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.rake$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("Rakefile$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.gemspec$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.ru$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("Gemfile$" . enh-ruby-mode)) | |
(add-to-list 'interpreter-mode-alist '("ruby" . enh-ruby-mode)) |
OlderNewer