Skip to content

Instantly share code, notes, and snippets.

View dunn's full-sized avatar
💭
no

Alexandra Catalina dunn

💭
no
View GitHub Profile
@dunn
dunn / picture.sh
Last active August 29, 2015 14:09
image scaling for srcset
#!/usr/bin/env bash
SOURCE="$2"
ORIGINAL_SCALE="$1"
EXTENSION=$(echo "$SOURCE" | ag -o "\.[a-z]+$")
# http://hints.macworld.com/article.php?story=20031124140353993
ORIGINAL_W=$(sips -g pixelWidth "$SOURCE" | ag -o "pixelWidth:\ [0-9]+" | sed 's:[^0-9]::g')
ORIGINAL_H=$(sips -g pixelHeight "$SOURCE" | ag -o "pixelHeight:\ [0-9]+" | sed 's:[^0-9]::g')
FILENAME=$(echo "$SOURCE" | sed "s:_*[0-9]*\.[a-zA-Z]*$::")
@dunn
dunn / codes.js
Created November 15, 2014 00:37
shortcodes for the mtgapi
module.exports = {
blocks: [
// not available yet
// 'ktk',
'jou',
'bng',
'ths',
'dgm',
@dunn
dunn / csv-to-array.awk
Created January 4, 2015 23:24
convert the Twitter archive csv file into something useful sheesh
#!/usr/local/bin/gawk -f
# I can't get multiline regular expressions to work well outside of
# TextMate, so before running this on tweets.csv I opened it in
# TextMate and replaced:
# ([^"])\n
# for
# $1\\n
@dunn
dunn / run_nerd.js
Last active August 29, 2015 14:14
lurks in yr slackroom waiting for a chance to talk about magic cards
#!/usr/bin/env node
var request = require('request');
var cheerio = require('cheerio');
var Slack = require('slack-client');
var token = require('./secrets.js').slack,
autoReconnect = true,
autoMark = true;
@dunn
dunn / inline.scss
Last active August 29, 2015 14:16
inline lists
@mixin inline($separator, $sep) {
ul, li {
/* http://www.alistapart.com/articles/taminglists/ */
display: inline;
margin: 0;
padding-left: 0;
}
li + li {
// old IE doesn't recognize ::before, so this keeps items at least a little separate
padding-left: $sep/2;

(From Frame Analysis, pp. 262–263)

Observe that the shift from spectacle to game—from encasing events to encased events—typically involves a change in frame, the encased or inner events hopefully generating a realm that is more narrowly organized than that represented by everyday life. In any case, in a precise examination of formal social proceedings, one would expect to find that the formalized starting and stopping brackets were themselves bracketed by informal ones pertaining to the social occasion in which the proceedings were housed. (16)

@dunn
dunn / hugo.diff
Last active August 29, 2015 14:16
diff --git a/hugolib/hugo.go b/hugolib/hugo.go
index 17ca1c2..9f9d189 100644
--- a/hugolib/hugo.go
+++ b/hugolib/hugo.go
@@ -4,7 +4,7 @@ import (
"html/template"
)
-const Version = "0.13-DEV"
+const Version = "0.13"

Keybase proof

I hereby claim:

  • I am dunn on github.
  • I am dunn (https://keybase.io/dunn) on keybase.
  • I have a public key whose fingerprint is ADFD DCE0 4C90 D696 7216 552B FCEC 4680 ECF9 24D9

To claim this, I am signing this object:

--- a/include/Make/Install.make.orig
+++ a/include/Make/Install.make
@@ -114,11 +114,6 @@
-$(INSTALL) config.status $(INST_DIR)/config.status
-$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null
-ifneq ($(findstring darwin,$(ARCH)),)
- @# enable OSX Help Viewer
- @/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
-endif
@dunn
dunn / grass.diff
Last active August 29, 2015 14:18
--- a/include/Make/Install.make 2015/04/08 07:53:52 1.1
+++ b/include/Make/Install.make 2015/04/08 07:54:13 1.2
@@ -116,11 +116,6 @@
-$(INSTALL) config.status $(INST_DIR)/config.status
-$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null
-ifneq ($(findstring darwin,$(ARCH)),)
- @# enable OSX Help Viewer
- @/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
-endif