Skip to content

Instantly share code, notes, and snippets.

<!--
* Complex Citation Generator
* Lives at: http://brighsworkshop.tumblr.com/post/399209671/complex-citation-template-generator
* Code revisions at: http://gist.github.com/332874
-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button#addRow").click(function(event){
$(".row:last").after("<div class='row'><input type='text' size='30' /><input type='text' size='30' /><input type='text' size='1' /><input type='text' size='1' /></div>");
@aeakett
aeakett / Andrew's favourites
Created December 8, 2011 20:58 — forked from endolith/Has weird right-to-left characters.txt
Unicode smileys emoticons
Why Not Zoidberg
(V)(;,,;)(V)
(V)(°,,°)(V)
y u no guy
ლ(ಠ益ಠლ)
table flip
(╯°□°)╯︵ ┻━┻ (ノಠ益ಠ)ノ彡┻━┻
@aeakett
aeakett / gist:3150673
Created July 20, 2012 13:17
2012 ennies voting
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in
@aeakett
aeakett / gist:3274644
Created August 6, 2012 14:02
Slogger RSS error
vincent:Slogger aeakett$ ruby slogger
I, [2012-08-06T10:00:20.145627 #16382] INFO -- : Loading RSS logger for feeds http://paizo.com/people/LisaStevens/posts&xml=rss
/Users/aeakett/bin/Slogger/lib/rsslogger.rb:52:in `log_rss': undefined method `match' for nil:NilClass (NoMethodError)
from /Users/aeakett/bin/Slogger/lib/rsslogger.rb:48:in `each'
from /Users/aeakett/bin/Slogger/lib/rsslogger.rb:48:in `log_rss'
from /Users/aeakett/bin/Slogger/lib/rsslogger.rb:41:in `each'
from /Users/aeakett/bin/Slogger/lib/rsslogger.rb:41:in `log_rss'
from slogger:52
vincent:Slogger aeakett$
@aeakett
aeakett / gist:4007370
Created November 3, 2012 13:21
optimize cbr and cbz files
# remove all the yucky characters from the file names and dump them in a dir
mmv '*.cbz' '#1.zip'
mmv '*.cbr' '#1.rar'
for i in *.zip; do mkdir $i.dir; unzip $i -d $i.dir; done
for i in *.rar; do mkdir $i.dir; unrar e $i $i.dir; done
# drag and drop all of the images into ImageOptim
# also check for extra pages with ads or other crap you don't need
for i in *.dir; do zip -9 $i.zip ./$i/*; done
mmv '*.*.dir.zip' '#1.cbz'
rm *.zip
@aeakett
aeakett / gist:4611834
Created January 23, 2013 19:21
shell function to extract most archives with one command (also corrals the contents of files that are known to be tarbombs)
# extract most archives with one command
# (also corrals the contents of files that are known to be tarbombs)
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.tar) tar xf $1 ;;
*.tgz) tar xzf $1 ;;
*.tbz2) tar xjf $1 ;;
@aeakett
aeakett / gist:6615149
Last active December 23, 2015 09:29
Decent font stacks
$serif-font-stack: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
$sans-serif-font-stack: "Helvetica Neue", Helvetica, Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, Arial, sans-serif;
$monospace-font-stack: Consolas, Inconsolata, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
$futura-font-stack: Futura, Futura-Medium, "Futura Medium", "Century Gothic", CenturyGothic, "Apple Gothic", AppleGothic, "URW Gothic L", "Avant Garde", sans-serif;
@aeakett
aeakett / gist:7771268
Last active December 30, 2015 03:39
Shell script to generate apple-touch-icon files and niceness for Metro tiles. Input file should be square and larger than the greatest output size (currently 310px).
#!/bin/bash
convert $1 -resize 180x180 apple-touch-icon-180x180-precomposed.png
convert $1 -resize 152x152 apple-touch-icon-152x152-precomposed.png
convert $1 -resize 144x144 apple-touch-icon-144x144-precomposed.png
convert $1 -resize 120x120 apple-touch-icon-120x120-precomposed.png
convert $1 -resize 114x114 apple-touch-icon-114x114-precomposed.png
convert $1 -resize 76x76 apple-touch-icon-76x76-precomposed.png
convert $1 -resize 72x72 apple-touch-icon-72x72-precomposed.png
convert $1 -resize 57x57 apple-touch-icon-precomposed.png
@aeakett
aeakett / gist:7872097
Last active December 30, 2015 19:09
Generates a QR Code to scan into a mobile device for the current page. Forked from https://code.google.com/p/qrbookmarklet/
function customURL(url)
{
if (url.indexOf('maps.google.com') != -1)
{
return document.getElementById('link').href;
}
else
{
return url;
}
@aeakett
aeakett / gist:9974521
Last active August 29, 2015 13:58
Additions to SublimeText 2's Solarized dark theme to make working in markdown nicer
<dict>
<key>name</key>
<string>Markdown start/end</string>
<key>scope</key>
<string>punctuation.definition.bold.markdown, punctuation.definition.italic.markdown</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#585858</string>
</dict>