Skip to content

Instantly share code, notes, and snippets.

@joekarma
joekarma / heavy_script.js
Created November 24, 2018 06:59
Test loading scripts dynamically via the async tag.
// 5083994434249045238370982602244531095915242207390678970959170161133260733910931635750861411685487191977874131442071930597145855579962632290254086552754023804836675395328896074663844582846482857392008733181690607382593964354730588096929569213363764619475634784759461302620791574886187125598304769164118428951992687612960151075264138495618179119227644466370344716149884424198031548094292282574637535713453479357177936473603040764235554793639466236111588077861673072785874703040291654907568526546626334428790917206277651256092588831298894695909302594460949315391317501741745648544504658079665231058334230147460531342148589478022471480659621182151162146440737995961579718053806067182156509365487366266864201238916920952355566462404349400659778030936393240425520431703965376176228851628401516500283004440733529418185212464093017713991325621602268685789376072909442318032557815855378390926117373654555535579627529550399392183764159943494812013235686259869984092978645813370981398398381284504441660343561812146438109171352657615
@joekarma
joekarma / heavy_script.js
Created November 24, 2018 06:59
Test loading scripts dynamically via the async tag.
This file has been truncated, but you can view the full file.
This file has been truncated, but you can view the full file.
console.log("Starting");
/*
@joekarma
joekarma / binary-transport.js
Last active May 27, 2018 18:33
Automatically generate zip file of HealthLink BC's MHSU services in various formats. Uses binary ajax transport to preserve encoding.
/**
*
* jquery.binarytransport.js
*
* @description. jQuery ajax transport for making binary data type requests.
* @version 1.0
* @author Henry Algus <henryalgus@gmail.com>
*
*/
@joekarma
joekarma / Key Bindings - User
Created August 14, 2016 10:45
Adding back ctrl+d to delete in Sublime Text for the Mac. Not sure why this is necessary... Maybe it's a plugin conflict?
[
{ "keys" : ["ctrl+d"], "command" : "right_delete" }
]
@joekarma
joekarma / iterm_images.rb
Created August 13, 2016 06:22
iTerm.app can display images, including gifs. Cool!
%w(open-uri base64).each { |lib| require lib }
# iTerm rocks!
img_url = "http://i.imgur.com/y9Rhu9i.gif"
if ENV["TERM_PROGRAM"] == "iTerm.app" # yay!
puts "\e]1337;File=inline=1:" + Base64.encode64(open(img_url).read) + "\a\n"
end
@joekarma
joekarma / gist:11027912
Last active August 29, 2015 14:00
Linking projects to cliki articles.
(defparameter *quicklisp-updated-projects*
"access, alexandria, architecture.hooks, asdf-dependency-grovel, asdf-encodings, babel, caveman, cffi, cffi-objects, cl+ssl, cl-6502, cl-algebraic-data-type, cl-ana, cl-autorepo, cl-autowrap, cl-blapack, cl-charms, cl-colors, cl-data-format-validation, cl-dbi, cl-emb, cl-erlang-term, cl-indeterminism, cl-isaac, cl-lastfm, cl-launch, cl-murmurhash, cl-nxt, cl-olefs, cl-plplot, cl-prime-maker, cl-qprint, cl-quickcheck, cl-randist, cl-rethinkdb, cl-sdl2, cl-sendmail, cl-smtp, cl-syslog, cl-yaclyaml, cl-zmq, clache, clack, clack-errors, cletris, clfswm, climc, climon, clinch, closer-mop, clsql, coleslaw, com.informatimago, common-lisp-stat, dartsclhashtree, define-json-expander, defmacro-enhance, defstar, drakma, elf, ernestine, esrap-liquid, fare-memoization, fare-quasiquote, fare-utils, firephp, fnv, fset, gbbopen, gendl, graph, gtk-cffi, hu.dwim.def, hu.dwim.logger, hu.dwim.util, inferior-shell, integral, iolib, jsown, lambda-reader, lisp-matrix, lisp-unit2, lisp-zm
@joekarma
joekarma / gist:6282093
Created August 20, 2013 14:27
Extracting info on supported attributes for each element in the single page HTML5 spec.
var els = document.querySelectorAll("dl.element");
var attrsList = document.querySelectorAll("dl.element > dt > a[title^='element-'][title$='-attributes']");
function getItemsInAttrList(aList) {
var r = [];
r.push(aList.parentNode.parentNode.previousElementSibling.querySelector("code").textContent);
aList = aList.parentNode;
while (aList.nextElementSibling && aList.nextElementSibling.nodeName.toLowerCase() == "dd") {
r.push(aList.nextElementSibling.textContent);
@joekarma
joekarma / gist:5565858
Created May 13, 2013 02:34
Example use of the DEFPROJECT macro.
(defproject project-demo ("project-demo.c0de.co")
(index ("/")
(with-basic-page ()
(<:h1 "Hello, world!")
(<:p "This isn't a real project. It's just a page that returns a random number.")
(<:p (<:ai (random 500))))))