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
let mapleader="," | |
set shell=/bin/sh | |
set nocompatible | |
set background=dark | |
set guifont=Monaco:h18 | |
set guitablabel=%M%t | |
set helplang=en | |
set langmenu=none | |
set backspace=indent,eol,start | |
set fileencoding=utf-8 |
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-window-option -g utf8 on | |
set -g mode-mouse on | |
set -g mouse-resize-pane on | |
set -g mouse-select-pane on | |
set -g mouse-select-window on | |
set-option -g prefix C-q | |
set -g history-limit 50000 | |
unbind-key C-b | |
bind-key q send-prefix | |
set -g base-index 1 |
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 Foo | |
attr_reader :bar | |
def initialize | |
@bar = 123 | |
ObjectSpace.define_finalizer( self, self.class.finalize(bar) ) | |
end | |
def self.finalize(bar) | |
proc { puts "DESTROY OBJECT #{bar}" } | |
end |
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
# WORKS THE FIRST TIME BUT FAILES WHEN RETURNING TO THE PAGE UNLESS RELOADING | |
jQuery -> | |
$('.clickable-row td').click -> | |
target_id = $(this).parent().attr('id').replace /row-id-/,'' | |
document.location = "/controller_xy/#{target_id}/edit" | |
# WORKS FINE EVERY TIME | |
jQuery -> | |
$(document).on( 'click', '.clickable-row td', -> |
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 color file | |
" Original Maintainer: Lars H. Nielsen (dengmao@gmail.com) | |
" Last Change: 2010-07-23 | |
" | |
" Converting for 256-color terminals by | |
" Danila Bespalov (danila.bespalov@gmail.com) | |
" with great help of tool by Wolfgang Frisch (xororand@frexx.de) | |
" inspired by David Liang's version (bmdavll@gmail.com) | |
set background=dark |
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 'ostruct' | |
# ad 1) | |
def sort_descending1 _objects, field | |
_objects.sort { |b,a| a.send(field) <=> b.send(field) } | |
end | |
# ad 2) | |
def safe_compare2 a,b,field | |
a.send(field) <=> b.send(field) |
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
" Call rspec from vim | |
" Apr 21st, 2014 Andi Altendorfer <andreas@altendorfer.at> | |
" | |
" RspecLine() ... run rspec for the current cursor line | |
" RspecFile() ... run rspec for the current file | |
" RspecAll() .... run entire suite | |
" | |
" Copy this file to your ./vim/pluglin directory | |
function RspecLine() |
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
" Call rspec from vim | |
" Apr 21st, 2014 Andi Altendorfer <andreas@altendorfer.at> | |
" | |
" RspecLine() ... run rspec for the current cursor line | |
" RspecFile() ... run rspec for the current file | |
" RspecAll() .... run entire suite | |
" | |
" Copy this file to your ./vim/pluglin directory | |
function RspecLine() |
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
" Call rspec from vim | |
" Apr 21st, 2014 Andi Altendorfer <andreas@altendorfer.at>, License MIT | |
" | |
" RunCurrentLine() ... evaluate current line with ruby-interpreter and append " output to the end of the line | |
" RunCurrentFile() ... evaluate current file with ruby-interpreter and append " output to the end of the file | |
" | |
" Copy this file to your ./vim/pluglin directory | |
function! RunCurrentLine () | |
exec "normal! $F#D" | |
let _current_line = getline(".") |