I hereby claim:
- I am arturopie on github.
- I am arturo_nulogy (https://keybase.io/arturo_nulogy) on keybase.
- I have a public key whose fingerprint is D0EA 60F3 EA18 4418 33CC 970C 5F5D 1814 E167 2015
To claim this, I am signing this object:
# setup: gem install observr | |
# usage: | |
# observr run_js_specs.rb | |
watch('spec/.*_spec.js') { |_| run_all_tests } | |
watch('client/.*.js') { |_| run_all_tests } | |
def run_all_tests | |
puts "RUNNING ALL TESTS" | |
system 'xvfb-run --auto-servernum node_modules/karma/bin/karma start karma.amd.conf.js --single-run' |
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'rack', github: 'rack/rack' | |
gem 'i18n', github: 'svenfuchs/i18n' | |
gem 'sqlite3' | |
GEMFILE |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/ruby | |
require 'open3' | |
failed = false | |
for i in 1..20 | |
puts i | |
stdin, stdout, stderr = Open3.popen3("sys161 kernel-ASST1 'sy2; q'") | |
if ((str = stderr.gets) =~ /sys161: Cannot/) |
# Add an "alert" alias for long running commands. Use like so: | |
# sleep 10; alert | |
alias alert='notify-send --urgency=low --hint int:transient:1 -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' | |
# to use no fast-forward by deafult | |
function git() { | |
if [[ $@ == merge* ]]; then | |
if [[ $@ == *--no-ff* ]]; then | |
command git "$@" |
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="gnzh" |
This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).
Huge thanks to funny-falcon for the performance patches.
# rake autocompletion from: | |
_rake_does_task_list_need_generating () { | |
if [ ! -f .rake_tasks~ ]; then return 0; | |
else | |
accurate=$(stat -c=%y .rake_tasks~) | |
changed=$(stat -c=%y Rakefile) | |
return $(expr $accurate '>=' $changed) | |
fi | |
} |
require 'eventmachine' | |
require 'colorize' | |
class RemoteCommands < EM::Connection | |
attr_reader :queue | |
def initialize(q) | |
@queue = q | |
cb = Proc.new do |msg| |
$require_level = [] | |
alias :orig_require :require | |
def require(file) | |
puts "#{$require_level.join}#{file}" | |
$require_level << "-" | |
r = orig_require(file) | |
$require_level.pop | |
r | |
end |