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.
// 5083994434249045238370982602244531095915242207390678970959170161133260733910931635750861411685487191977874131442071930597145855579962632290254086552754023804836675395328896074663844582846482857392008733181690607382593964354730588096929569213363764619475634784759461302620791574886187125598304769164118428951992687612960151075264138495618179119227644466370344716149884424198031548094292282574637535713453479357177936473603040764235554793639466236111588077861673072785874703040291654907568526546626334428790917206277651256092588831298894695909302594460949315391317501741745648544504658079665231058334230147460531342148589478022471480659621182151162146440737995961579718053806067182156509365487366266864201238916920952355566462404349400659778030936393240425520431703965376176228851628401516500283004440733529418185212464093017713991325621602268685789376072909442318032557815855378390926117373654555535579627529550399392183764159943494812013235686259869984092978645813370981398398381284504441660343561812146438109171352657615
This file has been truncated, but you can view the full file.
console.log("Starting");
/*
908492622235879112845875817386277141539782504635680609117310473758052492040782248110690915797531522003876073968698243136346055849216655178674658251010185851553704966581822809580919639622057678935449558167373418882394966241667700993731207758554971782907028475343841610202230086500940756126458234605935477003796945517883174678649352060868937489662881760281800404897503747980931062814363754253779083105017442712177527638553862205600015287082456436631082762395226475212623987272432864370365329391170009680150423554489710823756350658681946564227398220080464104486643170902545397210046650030699328980428202738742615274307969697619001824740324361447695258048630064991035954089109993143242550966296797319897370425729720205598800957009386138839210155586342337366737173596034222081133016969893396497684739219038549844653711978575797460458052026776693469932477558456934382222894485655677649076071222028546873749518986729668548823563597033805828454199439747904697012975349550415785609865294894783794332608165
@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))))))