Skip to content

Instantly share code, notes, and snippets.

@jacaetevha
jacaetevha / track.sh
Last active March 3, 2016 01:19 — forked from ammojamo/track.sh
#!/bin/sh
input=
while true
do
input="$(/usr/bin/osascript 2>/dev/null <<-__HEREDOC__
with timeout of 300 seconds
tell application "System Events"
// XORCipher - Super simple encryption using XOR and Base64
//
// Depends on [Underscore](http://underscorejs.org/).
//
// As a warning, this is **not** a secure encryption algorythm. It uses a very
// simplistic keystore and will be easy to crack.
//
// The Base64 algorythm is a modification of the one used in phpjs.org
// * http://phpjs.org/functions/base64_encode/
// * http://phpjs.org/functions/base64_decode/
@jacaetevha
jacaetevha / pdftk.rb
Created September 23, 2013 16:43 — forked from Echos/pdftk.rb
require 'formula'
class Pdftk < Formula
url 'http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-1.44-src.zip'
homepage 'http://www.pdflabs.com/'
md5 '9eb50fffcd621a627d387750c60982b4'
depends_on 'gcc' # with "--enable-java" option , required "Homebrew-alt" .
# via : https://github.com/adamv/homebrew-alt/
def install
@jacaetevha
jacaetevha / output
Created December 17, 2012 14:52 — forked from anonymous/output
RE: http://eval.in/4817 ... Singleton methods add some cost of execution to objects in MRI 1.9.3, not much in MRI 1.8.7, and JRuby doesn't seem to be affected. Note: the original anonymous Gist was mine also (didn't realize I wasn't logged in).
~/.rvm/rubies/jruby-1.6.5/bin/ruby
before singleton method definition
0.991000 0.000000 0.991000 ( 0.990000)
after singleton method definition
0.641000 0.000000 0.641000 ( 0.641000)
~/.rvm/rubies/jruby-1.6.7.2/bin/ruby
before singleton method definition
0.554000 0.000000 0.554000 ( 0.555000)
@jacaetevha
jacaetevha / sequel_reconnector.rb
Created September 28, 2012 17:30 — forked from qerub/sequel_reconnector.rb
Rack middleware that makes sure requests don't get a dead Sequel connection
class SequelReconnector
RETRY_LIMIT = 10 # Match this to your connection pool size.
def initialize(app, db)
@app = app
@db = db
end
def call(env)
retries = 0