Skip to content

Instantly share code, notes, and snippets.

chapmajs

Block or report user

Report or block chapmajs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:32b1ff7e78b838dbebcbd3b1ae40da25
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 Jul 26, 2017
Fixing squiggly heredoc on Pygments
View ruby_squiggly_heredoc.patch
*** 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
@chapmajs
chapmajs / rename-window command for X11
Created Jul 21, 2016
rename-window command for X11
View 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 Apr 11, 2014
Check your system rubies for vulnerable OpenSSL (CVE-2014-0160 "Heartbleed")
View description.md

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'
View keybase.md

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:

You can’t perform that action at this time.