Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AHaymond
AHaymond / Sublime Text Command Line
Created February 22, 2012 16:28
Set up sublime text for command line operation Mac OS X
Run this command in your terminal to add command line functionality for Sublime Text.
ln -s /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl ~/usr/local/bin/subl
This will create a symlink to the command line tool using your /usr/local/bin directory which should be in your PATH environment variable by default.
Once you create the symlink you can now open any text file by typing "subl textfile.txt"
@AHaymond
AHaymond / gist:11048813
Created April 18, 2014 15:04
rbenv install 2.0.0-p353 on Ubuntu 14.04 log file
```
/tmp/ruby-build.20140418085432.3403 ~/masteryconnect
HTTP/1.1 200 OK
Content-Type: binary/octet-stream
Content-Length: 503012
Connection: keep-alive
Date: Sun, 13 Apr 2014 13:29:24 GMT
Last-Modified: Fri, 28 Mar 2014 23:48:24 GMT
ETag: "5fe00cda18ca5daeb43762b80c38e06e"
Accept-Ranges: bytes
@AHaymond
AHaymond / gist:11218468
Last active August 29, 2015 14:00
Test patch for Ruby 2.0.0-p353 on Ubuntu 14.04
Index: ext/readline/readline.c
===================================================================
--- ext/readline/readline.c (revision 45224)
+++ ext/readline/readline.c (revision 45225)
@@ -1974,7 +1974,7 @@
rl_attempted_completion_function = readline_attempted_completion_function;
#if defined(HAVE_RL_PRE_INPUT_HOOK)
- rl_pre_input_hook = (Function *)readline_pre_input_hook;
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
@AHaymond
AHaymond / gist:11219512
Created April 23, 2014 15:16
Failed to patch Ruby 2.0.0-p353 install
Downloading ruby-2.0.0-p353.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/78282433fb697dd3613613ff55d734c1
Installing ruby-2.0.0-p353...
patching file ext/readline/readline.c
Hunk #1 succeeded at 1883 (offset -91 lines).
patching file ext/readline/extconf.rb
Hunk #2 FAILED at 98.
1 out of 2 hunks FAILED -- saving rejects to file ext/readline/extconf.rb.rej
patching file ext/readline/extconf.rb
Hunk #1 FAILED at 99.
@AHaymond
AHaymond / utils.go
Created February 3, 2016 20:19
snake case a camel cased word in Go
package utils
import (
"strings"

Keybase proof

I hereby claim:

  • I am AHaymond on github.
  • I am ode (https://keybase.io/ode) on keybase.
  • I have a public key whose fingerprint is 11BC 3CDF 217F 7907 DBA1 5B93 A8AF 6008 6778 4325

To claim this, I am signing this object:

@AHaymond
AHaymond / keybase.md
Created February 8, 2018 19:32
Keybase verification

Keybase proof

I hereby claim:

  • I am ahaymond on github.
  • I am ahaymond (https://keybase.io/ahaymond) on keybase.
  • I have a public key ASCqo-i7oP0LrO7fCHKBnkfj4rdevgZzn8194cXCqcqJvQo

To claim this, I am signing this object:

@AHaymond
AHaymond / myip.go
Created March 24, 2018 18:27 — forked from jniltinho/myip.go
Get My IP Golang
package main
/*
URL: https://github.com/mccoyst/myip/blob/master/myip.go
URL: http://changsijay.com/2013/07/28/golang-get-ip-address/
*/
import (
"net"
"os"
### Keybase proof
I hereby claim:
* I am ahaymond on github.
* I am adamhaymond (https://keybase.io/adamhaymond) on keybase.
* I have a public key ASAONF_SBZ4nVVVTgEgWtyyhEmHSiHc3f08csroQ-nomnAo
To claim this, I am signing this object:
@AHaymond
AHaymond / bash-colors.md
Last active January 28, 2024 19:38 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple