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 ExpiryCheck | |
ExpiryMins=15 | |
def self.included(target) | |
target.alias_method_chain :get_rate, :expiry_check | |
end | |
def get_rate_with_expiry_check(from, to) | |
check_for_rate_expiry | |
get_rate_without_expiry_check(from, to) |
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 g:NERDTreeCustomReuseWindows = '1' | |
call NERDTreeAddKeyMap({ | |
\ 'key': 'w', | |
\ 'scope': 'all', | |
\ 'callback': 'NERDTreeCustomToggleReuse', | |
\ 'quickhelpText': 'Toggle use existing windows' }) | |
function! NERDTreeCustomToggleReuse() | |
let g:NERDTreeCustomReuseWindows = g:NERDTreeCustomReuseWindows ? 0 : 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
call NERDTreeAddKeyMap({ | |
\ 'key': 'i', | |
\ 'scope': 'FileNode', | |
\ 'callback': "NERDTreeCustomOpenSplit", | |
\ 'quickhelpText': 'open split reusing if able' }) | |
function! NERDTreeCustomOpenSplit(node) | |
call a:node.open({'split': 'h', 'reuse': 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
function! s:Path._strForEdit() | |
let p = escape(self.str({'format': 'UI'}), s:escape_chars) | |
let cwd = getcwd() . s:Path.Slash() | |
"return a relative path if we can | |
let isRelative = 0 | |
if s:running_windows | |
let isRelative = stridx(tolower(p), tolower(cwd)) == 0 | |
else | |
let isRelative = stridx(p, cwd) == 0 |
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
if exists("g:loaded_nerdtree_custom_maps") | |
finish | |
endif | |
let g:loaded_nerdtree_custom_maps = 1 | |
"adds a keymapping on 'o' that overrides the standard nerdtree 'o' mapping and | |
"to open the file node and close the tree | |
call NERDTreeAddKeyMap({ | |
\ 'key': 'o', |
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
" /etc/vimrc (configuration file for vim only) | |
" author: Klaus Franken <kfr@suse.de> | |
" author: Werner Fink <werner@suse.de> | |
" author: Florian La Roche <florian@suse.de> | |
" version: 00/01/20 | |
" commented lines start with `"' | |
" enable syntax highlighting | |
syntax on |
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
"============================================================================== | |
" FileName: applescript.vim | |
" Desc: Syntax checking plugin for syntastic.vim | |
" Author: Zhao Cai | |
" Email: caizhaoff@gmail.com | |
" Version: 0.1 | |
" Date Created: Thu 09 Sep 2011 10:30:09 AM EST | |
" Last Modified: Fri 09 Dec 2011 10:32:04 AM EST | |
" | |
" History: 0.1 - working, but it will run the script everytime to check |
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
"============================================================================ | |
"File: c.vim | |
"Description: Syntax checking plugin for syntastic.vim | |
"Maintainer: Gregor Uhlenheuer <kongo2002 at gmail dot com> | |
"License: This program is free software. It comes without any warranty, | |
" to the extent permitted by applicable law. You can redistribute | |
" it and/or modify it under the terms of the Do What The Fuck You | |
" Want To Public License, Version 2, as published by Sam Hocevar. | |
" See http://sam.zoy.org/wtfpl/COPYING for more details. | |
" |
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
global !p | |
def underscore(s): | |
"""Convert FooBarBaz into foo_bar_baz""" | |
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', s) | |
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() | |
def camelcase(s): | |
"""Convert foo_bar_baz into FooBarBaz""" | |
it = iter(s.split('_')) | |
rv = "" |
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
function s:GetLineEnding() | |
let rv = "\n" | |
if s:Random() % 10 == 0 | |
for i in range(0,5) | |
if s:Random() % 2 == 1 | |
let rv = "\<c-v>\<tab>" . rv | |
else | |
let rv = " " . rv | |
endif |