Skip to content

Instantly share code, notes, and snippets.

Sun SPARCsystem 300.
ROM Rev 4.1.1, 8MB memory installed, Serial #3287.
Ethernet address 8:0:20:7:9B:EE, Host ID 23000CD7.
Testing 0 Megabytes of Memory ... Completed.
Auto-boot in progress...
Abort at PC 0xFFEA1120.
>
@chapmajs
chapmajs / ruby_squiggly_heredoc.patch
Created July 26, 2017 02:44
Fixing squiggly heredoc on Pygments
*** pygments/lexers/ruby.old 2017-07-25 22:03:14.847653103 -0400
--- pygments/lexers/ruby.py 2017-07-25 22:38:27.475907303 -0400
***************
*** 44,49 ****
--- 44,52 ----
def heredoc_callback(self, match, ctx):
# okay, this is the hardest part of parsing Ruby...
# match: 1 = <<-?, 2 = quote? 3 = name 4 = quote? 5 = rest of line
+ #
+ # Ruby >=2.3 has squiggly heredoc

Keybase proof

I hereby claim:

  • I am chapmajs on github.
  • I am glitch (https://keybase.io/glitch) on keybase.
  • I have a public key whose fingerprint is 89C1 2D18 5F5D 55E3 6E7B A7C5 6170 ED33 6B22 EA80

To claim this, I am signing this object:

@chapmajs
chapmajs / rename-window command for X11
Created July 21, 2016 02:18
rename-window command for X11
# I added this snippet to my .bashrc to give me a `rename-window` command when
# using a terminal (`st`, in my case). Invoke as:
#
# `rename-window "the name you desire"`
#
# If you don't have `xdotool` then we alias an echo so we'll know it's not there.
which xdotool >/dev/null 2>&1
if [ "$?" = "0" ]
then
@chapmajs
chapmajs / description.md
Created April 11, 2014 14:34
Check your system rubies for vulnerable OpenSSL (CVE-2014-0160 "Heartbleed")

So apparently MRI brings along its own statically linked OpenSSL:

$ openssl version
OpenSSL 0.9.8y 5 Feb 2013

$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]

$ ruby -r openssl -e 'puts OpenSSL::OPENSSL_VERSION'