Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

David Barri japgolly

🎯
Focusing
View GitHub Profile
View gist:1768922
# http://brunoreis.com/tech/intalling-java-ubuntu-natty/
update-alternatives --quiet --install /usr/lib/xulrunner-addons/plugins/libjavaplugin.so xulrunner-1.9-javaplugin.so /usr/lib/jvm/${java_dir}/jre/lib/${arch}/libnpjp2.so 63
update-alternatives --quiet --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /usr/lib/jvm/${java_dir}/jre/lib/${arch}/libnpjp2.so 63
update-alternatives --quiet --install /usr/bin/appletviewer appletviewer /usr/lib/jvm/${java_dir}/bin/appletviewer 63 --slave /usr/share/man/man1/appletviewer.1 appletviewer.1 /usr/lib/jvm/${java_dir}/man/man1/appletviewer.1
update-alternatives --quiet --install /usr/bin/apt apt /usr/lib/jvm/${java_dir}/bin/apt 63 --slave /usr/share/man/man1/apt.1 apt.1 /usr/lib/jvm/${java_dir}/man/man1/apt.1
update-alternatives --quiet --install /usr/bin/extcheck extcheck /usr/lib/jvm/${java_dir}/bin/extcheck 63 --slave /usr/share/man/man1/extcheck.1 extcheck.1 /usr/lib/jvm/${java_dir}/man/man1/extcheck.1
update-alternatives --quiet --install /
View .java-7-sun.jinfo
name=java-7-sun
alias=java-7-sun
priority=63
section=non-free
jre ControlPanel /usr/lib/jvm/java-7-sun/jre/bin/ControlPanel
jre java /usr/lib/jvm/java-7-sun/jre/bin/java
jre java_vm /usr/lib/jvm/java-7-sun/jre/bin/java_vm
jre javaws /usr/lib/jvm/java-7-sun/jre/bin/javaws
jre jcontrol /usr/lib/jvm/java-7-sun/jre/bin/jcontrol
View .vimrc
call pathogen#infect()
set nobackup
set history=200
syntax on
filetype plugin indent on
set colorcolumn=121 " Margin on the right
set number " Show line numbers on the left
"let g:CSApprox_attr_map = { 'bold' : 'bold', 'italic' : '', 'sp' : '' }
set background=dark
@japgolly
japgolly / gist:1890994
Created Feb 23, 2012
ruby-debug19 deps
View gist:1890994
# Install with:
# bash < <(curl -L https://raw.github.com/gist/1890994)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p125 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@japgolly
japgolly / error_log.txt
Created Mar 27, 2012
RubyProf error log
View error_log.txt
/home/golly/.rvm/gems/ruby-1.9.3-p125/bundler/gems/ruby-prof-f30efda79fcf/lib/ruby-prof/printers/call_stack_printer.rb:86: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0091 p:0013 s:0460 b:0459 l:000446 d:000458 BLOCK /home/golly/.rvm/gems/ruby-1.9.3-p125/bundler/gems/ruby-prof-f30efda79fcf/lib/ruby-prof/printers/call_stack_printer.rb:86
c:0090 p:---- s:0456 b:0456 l:000455 d:000455 FINISH
c:0089 p:---- s:0454 b:0454 l:000449 d:000453 IFUNC
c:0088 p:---- s:0452 b:0452 l:000451 d:000451 CFUNC :each
c:0087 p:---- s:0450 b:0450 l:000449 d:000449 CFUNC :any?
c:0086 p:0201 s:0447 b:0447 l:000446 d:000446 METHOD /home/golly/.rvm/gems/ruby-1.9.3-p125/bundler/gems/ruby-prof-f30efda79fcf/lib/ruby-prof/printers/call_stack_printer.rb:86
View reentrancy-benchmark-jruby.rb
require 'benchmark'
require 'thread'
require 'monitor'
mutex = Mutex.new
monitor = Monitor.new
nop = proc{}
range = 1..1_000_000
for j in 1..20
@japgolly
japgolly / gist:2485642
Created Apr 25, 2012
JRuby JSON lib benchmarks
View gist:2485642
=================================================================================================================
jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-22 3e82bc8) (OpenJDK 64-Bit Server VM 1.7.0_03-icedtea) [linux-amd64-java]
ENGINES: [:jr_jackson]
REPS: 100000
WARMUPS: 5
------------------------------------------------------------------
Writing (warmup)
user system total real
@japgolly
japgolly / prob.rb
Created Sep 12, 2012
Issue with RSpec and at_exit
View prob.rb
def dynamic_fixture_root
$gu_dynamic_fixture_root || DYNAMIC_FIXTURE_ROOT_LOCK.synchronize {
$gu_dynamic_fixture_root ||= (
at_exit {
FileUtils.remove_entry_secure $gu_dynamic_fixture_root if $gu_dynamic_fixture_root
$gu_dynamic_fixtures= $gu_dynamic_fixture_root= nil
}
Dir.mktmpdir
)
}
@japgolly
japgolly / mvnc.sh
Last active Oct 12, 2015
Mvn colour script
View mvnc.sh
#!/bin/bash
RESET="\e[0m"
BLACK="\e[0;30m"
RED="\e[0;31m"
GREEN="\e[0;32m"
YELLOW="\e[0;33m"
BLUE="\e[0;34m"
MAGENTA="\e[0;35m"
CYAN="\e[0;36m"
View convert_artwork.rb
DENSITIES= {
'-mdpi' => 1.0,
'-ldpi' => 0.75,
'-hdpi' => 1.5,
'-xhdpi' => 2.0,
}
def run_cmd(cmd)
puts cmd
system cmd
You can’t perform that action at this time.