Skip to content

Instantly share code, notes, and snippets.

@aeakett
aeakett / solarized.xml
Created March 23, 2016 12:50
rough pass at making a Solarized theme for muCommander
<?xml version="1.0" encoding="UTF-8"?>
<theme>
<!-- = File table appearance ========================= -->
<!-- ================================================= -->
<file_table>
<font family="Consolas" size="13"/>
<border color="404040"/>
<inactive_border color="404040"/>
<outline color="073642"/>
<inactive_outline color="cccccc"/>
@aeakett
aeakett / find_dupe_ids
Last active August 29, 2015 14:13
Find duplicate IDs in an HTML file
grep -Ho 'id="[^"]*"' <FILE NAME GOES HERE>|sort|uniq -d
@aeakett
aeakett / ingest.sh
Created April 29, 2014 18:45 — forked from ae-s/ingest.sh
#!/bin/bash
display -sample 600 $1 2>&1 >/dev/null &
viewer_pid=$!
sleep 0.5
echo '===='
echo 'What is the date shown? YYYY-MM-DD'
read -p 'date> ' -e -i "$date" date
@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>
@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: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: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: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: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