Skip to content

Instantly share code, notes, and snippets.

View blaxter's full-sized avatar

Jesús García Sáez blaxter

  • Zaragoza, Spain
View GitHub Profile
@blaxter
blaxter / readlog.rb
Created July 17, 2012 15:13
readlog.rb for android adb logcat
#!/usr/bin/ruby
RED = "\033[0;31m"
RESET = "\033[0m"
YELLOW = "\033[0;33m"
C = "\033[0;35m"
trap("INT") { puts; exit! 127 }
def stamp line
n addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
@blaxter
blaxter / irbrc
Created April 9, 2009 15:49
~/.irbrc
require 'irb/completion'
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:PROMPT_MODE] = :SIMPLE
@blaxter
blaxter / vimrc
Created April 3, 2009 19:16
~/.vimrc
runtime! macros/matchit.vim
runtime! debian.vim
colorscheme torte
syntax on
:highlight Normal guibg=Black guifg=White
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
@blaxter
blaxter / aptana.rake
Created March 26, 2009 09:14
rake aptana:aptana task for generating both .loadpath and .projects file to load a rails project into eclipse aptana IDE
namespace :aptana do
RAILS_APPDIR = RAILS_ROOT.sub("/config/..","")
LIBS = %w{rails activerecord actionmailer actionpack
actionwebservice activeresource activesupport}
def project_name
Pathname.new(RAILS_APPDIR).basename.to_s
end
@blaxter
blaxter / gist:81318
Created March 18, 2009 19:02
~/.gitconfig
[user]
name = adsdsad
email = sdad
[alias]
ci = commit
co = checkout
st = status
diffindex = diff-index -p -M -b -w --color HEAD