This file contains hidden or 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
# (semi) official book name as hash key | |
# abbreviations in array as value | |
ABBR = { | |
"Genesis" => [ | |
"Gen", | |
"Ge", | |
"Gn" | |
], | |
"Exodus" => [ |
This file contains hidden or 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
# this has NOT been tested! | |
require 'net/http' | |
require 'uri' | |
uri = URI("http://google.com") | |
content = '' | |
Net::HTTP.get_response(uri) do |res| | |
return if res.header['Content-Type'].split(';').first != 'text/html' |
This file contains hidden or 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
# This works as of Feb 2011 on Ubuntu Maverick | |
sudo apt-get install build-essential autoconf checkinstall | |
svn co http://dev.zenoss.org/svn/trunk/wmi/Samba/source | |
cd source | |
wget https://gist.github.com/raw/843062/5bb87c4fa13688f65ca8b1e54fc42676aee42e5a/fix_winexe_service.diff | |
patch -p0 -i fix_winexe_service.diff | |
./autogen.sh | |
./configure | |
make proto bin/winexe |
This file contains hidden or 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
# hack to auto compile sass when Jammit runs in Dev/Test mode | |
require 'haml/util' | |
require 'sass/engine' | |
module Jammit | |
module Helper | |
SASS_TIMESTAMPS = {} | |
def include_stylesheets_with_sass(*packages) |
This file contains hidden or 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
# creates a global JST object containing all the templates | |
# 1. install Tilt in your Gemspec | |
# 2. Paste this in a file at app/assets/javascripts/templates.js.coffee.erb | |
# 3. `require` the templates file from your main js include file. | |
# 4. Put your templates at app/views/whatever/my_template.html.jst | |
window.JST = | |
<% Dir[Rails.root.join('app/views/**/*.jst')].each do |path| %> | |
<%= path.match(%r{/([^/]+)\.html\.jst$})[1] %>: _.template(<%= File.read(path).inspect.gsub(/\r?\n/, '') %>) | |
<% end %> |
This file contains hidden or 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
diff --git a/colors/solarized.vim b/colors/solarized.vim | |
index 81c2c99..8085e7c 100644 | |
--- a/colors/solarized.vim | |
+++ b/colors/solarized.vim | |
@@ -667,7 +667,7 @@ exe "hi StatusLine" . s:fg_base0 .s:bg_base02 .s:fmt_none | |
exe "hi StatusLineNC" . s:fg_base1 .s:bg_base02 .s:fmt_none | |
exe "hi VertSplit" . s:fg_base0 .s:bg_base02 .s:fmt_none | |
exe "hi Title" . s:fg_orange .s:bg_none .s:fmt_bold | |
-exe "hi Visual" . s:fg_none .s:bg_base02 .s:fmt_stnd | |
+exe "hi Visual" . s:fg_none .s:bg_base0 .s:fmt_stnd |
This file contains hidden or 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
#!/usr/bin/env ruby | |
class Enumerator | |
def count_with_index | |
count = 0 | |
each_with_index do |item, index| | |
count += yield(item, index) ? 1 : 0 | |
end | |
count | |
end |
This file contains hidden or 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 not running interactively, don't do anything | |
if [[ -n "$PS1" ]]; then | |
... | |
fi | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" |
This file contains hidden or 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
diff --git a/plugin/fuzzyfinder.vim b/plugin/fuzzyfinder.vim | |
index a717bfd..f5d42fa 100644 | |
--- a/plugin/fuzzyfinder.vim | |
+++ b/plugin/fuzzyfinder.vim | |
@@ -872,6 +872,7 @@ endfunction | |
" | |
function! g:FuzzyFinderMode.Buffer.on_buf_enter() | |
call self.update_buf_times() | |
+ setlocal buflisted | |
endfunction |