Skip to content

Instantly share code, notes, and snippets.

View madmax's full-sized avatar

Grzegorz Derebecki madmax

View GitHub Profile
set nocompatible
call pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
" swp to one directory outside project
" set backupdir=~/.vim/tmp,.
@madmax
madmax / assets.rake
Created June 10, 2012 16:17
Faster way to compile assets
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
@madmax
madmax / gist:1474059
Created December 13, 2011 21:54
changing font in textmate 2
1. Open Bundle editor
2. Select Themes -> Themes -> your theme
3. add to settings
fontName = 'Monaco';
fontSize = '12px';
or what you want, enjoy :)
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
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);
},