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
var ImageResize = { | |
margin: 8, | |
parse: function(css_id, margin) { | |
if(margin) { this.margin = margin; } | |
$$('#' + css_id + ' img').each(function(img) { | |
this.resize(img, $(css_id).getWidth() - this.margin); | |
}, this); | |
}, |
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
class TopicWorker < Resque::JobWithStatus | |
#extend Resque::Plugins::Retry | |
#@retry_limit = 0 | |
#@retry_delay = 60 | |
@queue = :low | |
attr_accessor :options | |
def perform | |
self.options = options.reverse_merge(:until_time => Time.current).symbolize_keys |
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
1. Open Bundle editor | |
2. Select Themes -> Themes -> your theme | |
3. add to settings | |
fontName = 'Monaco'; | |
fontSize = '12px'; | |
or what you want, enjoy :) |
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 "fileutils" | |
namespace :assets do | |
namespace :precompile do | |
desc "Faster way to compile assets" | |
task fast: ["assets:environment", "tmp:cache:clear", "assets:precompile:primary"] do | |
config = Rails.application.config | |
if config.assets.digest | |
assets_path = File.join(Rails.public_path, config.assets.prefix) | |
manifest_path = config.assets.manifest || assets_path |
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
set nocompatible | |
call pathogen#infect() | |
call pathogen#helptags() | |
syntax on | |
filetype plugin indent on | |
" swp to one directory outside project | |
" set backupdir=~/.vim/tmp,. |
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
set nocompatible | |
call pathogen#infect() | |
call pathogen#helptags() | |
syntax on | |
filetype plugin indent on | |
" swp to one directory outside project | |
" set backupdir=~/.vim/tmp,. |
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
set nocompatible | |
call pathogen#infect() | |
call pathogen#helptags() | |
syntax on | |
filetype plugin indent on | |
" swp to one directory outside project | |
" set backupdir=~/.vim/tmp,. |
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
""" Code folding options | |
nmap <leader>0 :set foldlevel=0<CR> | |
nmap <leader>1 :set foldlevel=1<CR> | |
nmap <leader>2 :set foldlevel=2<CR> | |
nmap <leader>3 :set foldlevel=3<CR> | |
nmap <leader>4 :set foldlevel=4<CR> | |
nmap <leader>5 :set foldlevel=5<CR> | |
nmap <leader>6 :set foldlevel=6<CR> | |
nmap <leader>7 :set foldlevel=7<CR> | |
nmap <leader>8 :set foldlevel=8<CR> |
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/bash | |
GITHUB_USER="madmax" | |
if [ "$1" != "" ]; then | |
echo "Merging pull request $1" | |
OUT=`basename $1` | |
curl --user $GITHUB_USER $1.patch > $OUT.patch | |
git am -s --3way --ignore-space-change $OUT.patch | |
rm $OUT.patch | |
else |
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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' |
OlderNewer