Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am jacktasia on github.
  • I am jack ( on keybase.
  • I have a public key whose fingerprint is 5810 04B5 0B06 B765 0F82 2F33 2FC5 F3ED 263E A8ED

To claim this, I am signing this object:

jacktasia / gist:966924
Created May 11, 2011
get pid of running
View gist:966924
ps ax | grep [g]calc | ack-grep -oh '[0-9]{3,}'
jacktasia / dotemacs24.el
Created Jun 17, 2012
.emacs for emacs 24
View dotemacs24.el
Moved this here:
jacktasia /
Created Aug 30, 2013
auto-save illustrator every 60 seconds (mac only)
import os
import time
import subprocess
def is_illustrator_open():
""" probably a better way to do this! """
ps = subprocess.Popen(['ps', 'ax'], stdout = subprocess.PIPE)
grep = subprocess.Popen(['grep', 'Adobe Ill'], stdin = ps.stdout, stdout = subprocess.PIPE)
wc = subprocess.Popen(['wc', '-l'], stdin = grep.stdout, stdout = subprocess.PIPE)
open = int(wc.communicate()[0])
jacktasia / test.clj
Created Oct 25, 2013
Pretty print clojure code
View test.clj
(use 'clojure.pprint)
(require ' [clojure.edn :as edn])
(let [file-contents (slurp "clojure_test2.clj")
process-file (with-out-str
(edn/read-string (str "[" file-contents "]"))
(println (subs process-file 1 (- (.length process-file) 1))))
jacktasia /
Created Feb 20, 2015
imgix Java purge example (1.8 w/o dependencies)
import java.util.Base64;
public class ImgixPurgeExample {
jacktasia / imgix_purge.php
Created Jan 4, 2015
imgix PHP purge example
View imgix_purge.php
// find your api key on the bottom of page @
define('IMGIX_API_KEY', '');
// pass the url you want to purge
function imgix_purge($url) {
$headers = array(
'Authorization: Basic '. base64_encode(IMGIX_API_KEY.':')