You must have the following gems installed:
- haml (or haml-rails)
- html2haml
- hpricot
- ruby_parser
//Thank you to Alen Grakalic: http://cssglobe.com/lab/css3_tags/01.html | |
$_tag_color: #006DDC | |
.tags | |
list-style: none | |
margin: 10px 0 0 0 | |
.tags li, .tags a | |
float: left | |
height: 20px | |
line-height: 20px |
(function(){ | |
findURLParams = function() { | |
var params = {}; | |
location.search.replace( | |
/([^?=&]+)(=([^&]*))?/g, | |
function (match, key, full, value) { | |
params[key] = decodeURIComponent(value); | |
} | |
); | |
return params; |
// Uses same syntax as #if helper but initially returns false for falsey or empty string values. | |
Handlebars.registerHelper('unless_blank', function(item, block) { | |
return (item && item.replace(/\s/g,"").length) ? block.fn(this) : block.inverse(this); | |
}); | |
// Only the first 2 rows will be displayed. | |
data = { | |
rows: [ | |
'user_name': 'Blake', | |
'user_name': 'Joe', |
task :devenv_check do | |
raise "You can only run this task in development mode!" unless Rails.env == 'development' | |
end | |
task :setup do | |
puts "Preparing to build databases. Running Rake tasks...." | |
#Remove all existing photo uploads and caches. TextMate users will appreciate this! | |
system "rm -rf public/uploads/*" | |
system "rm -rf tmp/cache/*" |
tabSize = 2 | |
softTabs = true | |
showInvisibles = true | |
include = "{.rvmrc,.rspec,.gitignore,.tm_properties,.htaccess}" | |
excludeInFileChooser = "{$excludeInFileChooser,log,vendor,tmp,.sass-cache,uploads}" | |
excludeInBrowser = "{$excludeInBrowser,log,vendor,tmp,.sass-cache,uploads}" | |
excludeInFolderSearch = "{$excludeInFolderSearch,log,vendor,tmp,.sass-cache,uploads}" |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'tpope/vim-fugitive' | |
Bundle 'tpope/vim-rails' |
alias ls='ls -G' | |
alias lsa='ls -la' | |
alias g='git' | |
alias gp="git pull" | |
alias gpu="git push" | |
alias gpt="git push --tags" | |
alias gpp="git pull && git push" | |
alias gc="git checkout" | |
alias gs="git status" |
// Discovered here then refactored: http://davidwalsh.name/detect-scrollbar-width | |
var checkScrollbarWidth = function() { | |
var $body = $("body"), | |
$div = $('<div class="scrollbar-measure">'), | |
scrollbarWidth; | |
$div.appendTo( $body ); | |
scrollbarWidth = $div[0].offsetWidth - $div[0].clientWidth; | |
$div.remove(); |
{ | |
// JSHint Default Configuration File (as on JSHint website) | |
// See http://jshint.com/docs/ for more details | |
"maxerr" : 50, // {int} Maximum error before stopping | |
// Enforcing | |
"bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
"camelcase" : false, // true: Identifiers must be in camelCase | |
"curly" : true, // true: Require {} for every new block or scope |