Skip to content

Instantly share code, notes, and snippets.

View elmer's full-sized avatar
:octocat:
exploring

Elmer Rivera elmer

:octocat:
exploring
View GitHub Profile
We couldn’t find that file to show.
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
Rubinius Crash Report #rbxcrashreport
Error: signal SIGBUS
[[Backtrace]]
0 rbx 0x00011554 _ZN8rubinius11Environment19setup_cpp_terminateEv + 564
1 libSystem.B.dylib 0x909c39fc _sigtramp + 68
2 ??? 0x00000000 0x0 + 0
3 ??? 0x03c18e04 0x0 + 63016452
@elmer
elmer / ruby-1.9-tips.rb
Created May 20, 2011 14:04 — forked from igrigorik/ruby-1.9-tips.rb
Ruby 1.9 features, tips & tricks you may not know about...
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@elmer
elmer / bg-log-selinux
Created November 11, 2011 01:11
bg-log
D, [2011-11-10T09:19:13.044567 #25378] DEBUG -- : GFS: mount_options "" "/dev/sda2" "/boot"
D, [2011-11-10T09:19:14.328056 #25378] DEBUG -- : GFS: mount_options = 0
D, [2011-11-10T09:19:14.328372 #25378] DEBUG -- : GFS: set_e2label "/dev/sda2" "e21a3e10"
D, [2011-11-10T09:19:14.823726 #25378] DEBUG -- : GFS: set_e2label = 0
D, [2011-11-10T09:19:14.824347 #25378] DEBUG -- : GFS: exists "/etc/sysconfig/selinux"
D, [2011-11-10T09:19:15.003875 #25378] DEBUG -- : GFS: exists = 1
D, [2011-11-10T09:19:15.004529 #25378] DEBUG -- : GFS: aug_init "/" 32
D, [2011-11-10T09:19:28.505226 #25378] DEBUG -- : GFS: aug_init = 0
D, [2011-11-10T09:19:28.505545 #25378] DEBUG -- : GFS: aug_rm "/augeas/load//incl[. != '/etc/sysconfig/selinux']"
D, [2011-11-10T09:19:28.517468 #25378] DEBUG -- : GFS: aug_rm = 0
@elmer
elmer / gist:1356977
Created November 11, 2011 02:19
boxgrinder-selinux-log
T, [2011-11-10T20:33:29.483924 #30743] TRACE -- : GFS: /bin/sh -c /usr/sbin/load_policy
T, [2011-11-10T20:34:08.107187 #30743] TRACE -- : GFS: libsepol.policydb_write:
T, [2011-11-10T20:34:08.109158 #30743] TRACE -- : GFS: Discarding booleans and conditional rules
T, [2011-11-10T20:34:08.111421 #30743] TRACE -- : GFS:
T, [2011-11-10T20:34:48.252430 #30743] TRACE -- : GFS: libsepol.policydb_write:
T, [2011-11-10T20:34:48.256352 #30743] TRACE -- : GFS: Discarding booleans and conditional rules
T, [2011-11-10T20:35:02.971213 #30743] TRACE -- : GFS: libsepol.context_read_and_validate: in
T, [2011-11-10T20:35:03.096216 #30743] TRACE -- : GFS: valid security context
libsepol.policydb_to_image: new policy image is invalid
libsepol.policydb_to_ima
@elmer
elmer / gist:1369529
Created November 16, 2011 07:56 — forked from avdi/gist:1026546
A Guardfile for starting Redis
module ::Guard
class Redis < Guard
def start
puts "Starting Redis on port #{port}"
IO.popen("#{executable} -", 'w+') do |server|
server.write(config)
server.close_write
end
puts "Redis is running with PID #{pid}"
$?.success?
@elmer
elmer / logsearch.rb
Created November 29, 2011 10:36 — forked from lusis/log4j.xml
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
begin
require 'tire'
require 'slop'
require 'time'
rescue LoadError
puts "You seem to be missing some key libraries"
puts "please run `gem install bundler --no-ri --no-rdoc; bundle install`"
@elmer
elmer / ci_hook.bat
Created December 4, 2011 17:24 — forked from infertux/ci_hook.bat
EC2 Windows CI hackish scripts
@echo off
REM If you edit this file, make sure to run `unix2dos` to fix those fucking CRLF.
REM Let's keep this script as dumb as possible and do all the logic with a true language.
REM Basically, this should be no more than a sort of remote control.
echo Initializing hook...
:begin
@elmer
elmer / *install*
Created December 6, 2011 11:40 — forked from jcrossley3/*install*
$ rvm install jruby && rvm --create jruby@torquebox && jruby -J-Xmx1024m -S gem install torquebox-server --pre && torquebox
jruby-1.6.5 - #fetching
jruby-1.6.5 - #downloading jruby-bin-1.6.5, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14.6M 100 14.6M 0 0 1868k 0 0:00:08 0:00:08 --:--:-- 2189k
jruby-1.6.5 - #extracting jruby-bin-1.6.5 to /Users/jim/.rvm/src/jruby-1.6.5
jruby-1.6.5 - #extracted to /Users/jim/.rvm/src/jruby-1.6.5
Building Nailgun
jruby-1.6.5 - #installing to /Users/jim/.rvm/rubies/jruby-1.6.5