Skip to content

Instantly share code, notes, and snippets.

View caomai's full-sized avatar

Shawn Skriver caomai

  • St Charles, IL
  • 04:30 (UTC -05:00)
View GitHub Profile
########## Match this type of block (the service_description value varies)
service_description sys_swap
use unix-p-services
########## Edit to become this (the use value changes -- the 'p' becomes an 'n')
service_description sys_swap
use unix-n-services
This is just a test file for testing gisty.
@caomai
caomai / string_unindent_for_heredoc.rb
Created August 29, 2011 16:53
Extend String class with unindent method to tidy HEREDOC
## Credit to SpiralOfHope for bugfix
### https://twitter.com/#!/spiralofhope
## Credit to Rene Sarsoo for original code
### http://stackoverflow.com/users/15982/rene-saarsoo
### http://stackoverflow.com/questions/3772864/how-do-i-remove-leading-whitespace-chars-from-ruby-heredoc/4465640#4465640
class String
# Bug-fixed: If there is no indenting, this explodes. I changed \s+ to \s*
@caomai
caomai / lein2replerror
Created April 29, 2012 04:45
leiningen 2 repl error - Fedora 16
[skrivsm@LUCID ~]$ which lein
~/bin/lein
[skrivsm@LUCID ~]$ ll ~/bin/lein
lrwxrwxrwx. 1 skrivsm skrivsm 5 Apr 23 22:25 /home/skrivsm/bin/lein -> lein2
[skrivsm@LUCID ~]$ lein version
Leiningen 2.0.0-preview3 on Java 1.6.0_24 OpenJDK 64-Bit Server VM
[skrivsm@LUCID ~]$ lein repl
nREPL server started on port 59599
IllegalArgumentException Missing closing quote on line '"\e'
jline.console.ConsoleKeys.loadKeys (ConsoleKeys.java:179)

Keybase proof

I hereby claim:

  • I am caomai on github.
  • I am skrivsm (https://keybase.io/skrivsm) on keybase.
  • I have a public key whose fingerprint is C2B6 3BD2 07F3 630F A24A 9CA5 D02D 0407 08C3 36A0

To claim this, I am signing this object: