Skip to content

Instantly share code, notes, and snippets.

Chris Le chrisle

Block or report user

Report or block chrisle

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
admackin /
Created Oct 15, 2012
Build tmux (iTerm2 version) as a local single-user installation on Ubuntu 10.04
mkdir tmp
cd tmp
wget | tar xzf -
cd libevent-2.0.20-stable
./configure --prefix=$HOME/local && make && make install
cd ..
seamusabshere / excelwebservice.vb
Created Sep 28, 2012
Excel VB for accessing as a web service (early 2011)
View excelwebservice.vb
Option Explicit
Function GetBrighterPlanetApiKey()
GetBrighterPlanetApiKey = ActiveWorkbook.Worksheets("Setup").Range("C2").Value
End Function
Function IsEmissionEstimateServiceOnline()
If LCase(ActiveWorkbook.Worksheets("Setup").Range("C3").Value) = "online" And ThisWorkbook.HasFinishedWorkbookOpen() = True Then
IsEmissionEstimateServiceOnline = True
brandonb927 /
Last active May 27, 2020
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
walterdavis / document.rb
Created Jul 1, 2012
Text extraction processor for Paperclip to read PDF files
View document.rb
def extract_text
file ="#{pdf.queued_for_write[:text].path}","r")
plain_text = ""
while (line = file.gets)
# plain_text << line.gsub(/[^\x00-\x7F]/n,'').gsub(/`/,"'").gsub(/^\d+$/,'').to_s + "\n"
plain_text << Iconv.conv('ASCII//IGNORE', 'UTF8', line)
self.plain_text = plain_text
#self.plain_text = Iconv.conv('ASCII//IGNORE', 'UTF8',
gasman / pnginator.rb
Created Apr 30, 2012
pnginator: pack Javascript into a self-extracting PNG
View pnginator.rb
#!/usr/bin/env ruby -w
# pnginator.rb: pack a .js file into a PNG image with an HTML payload;
# when saved with an .html extension and opened in a browser, the HTML extracts and executes
# the javascript.
# Usage: ruby pnginator.rb input.js output.png.html
# By Gasman <>
# from an original idea by Daeken:
paulmillr /
Created Jan 20, 2012
ECMAScript 6 proxies fun (method missing, negative array indexes)
# Ruby’s “method missing” analog with ES6 proxies.
proxify = (object) ->
new Proxy object, get: (receiver, name) ->
object[name] ? object.methodMissing.bind object, name
object = proxify
a: 1,
b: 15,
c: ->
You can’t perform that action at this time.