Skip to content

Instantly share code, notes, and snippets.

View MichaelPaulukonis's full-sized avatar

Michael Paulukonis MichaelPaulukonis

View GitHub Profile
@atduskgreg
atduskgreg / actants.asciidoc
Created February 29, 2012 23:53
A list of every example actant mentioned in the first half of Prince of Networks by Graham Harman

A list of every example actant mentioned in the first half of Prince of Networks by Graham Harman

"These long lists of random actors must continue until their plurality and autonomy is no longer suppressed. We still know nothing about these objects or what they entail. All that is clear is their metaphysical equality. The world is a stage filled with actors; philosophy is object-oriented philosophy." — Harman, Prince of Networks.

"[These lists are] a repeated sorcerer’s chant of the multitude of things that resist any unified empire." — Harman, Prince of Networks

  • lactc acid ferment

  • city of Rouen

  • the laboratory on the Rue d’Ulm

  • God

@sukima
sukima / ShortUrl.coffee
Last active December 10, 2015 22:38
A JavaScript (CoffeeScript) Implementation of a client side (static) URL Shortener.
# A module to handle fetching, parsing, and displaying the short urls data and
# to handle loading the long url baed on the passed in hash tag.
#
# When this is executed on a page it will load the data from a JSON file. It
# the checks if there is a hash tag in the URL. If so it redirects the page to
# the long url. If not it lists out all the short urls.
#
# For example, `http://mysite.com/s/` will display the list and
# `http://mysite.com/s/#1` will redirect to the associated url for the id 1.
#
@leommoore
leommoore / node_build_automation.md
Last active December 13, 2015 17:58
Node - Build Automation

#Node - Build Automation

##Setup

Jake is the JavaScript equivilent of the Ruby Rake tool. It prefers to be installed globally but for build purposes it is better to install it into node_modules. For more info see http://howtonode.org/intro-to-jake

npm install jake
@anthonyringoet
anthonyringoet / Gruntfile.js
Created November 22, 2013 08:37
Auto compile browserify with Grunt and watch
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
dist: {
files: {
'build/module.js': ['js/**/*.js']
}
}
@h3xx
h3xx / glitch-jpeg.pl
Created December 26, 2013 07:15
Add deliberate errors to JPEG files (or any files)
#!/usr/bin/perl -w
use strict;
use Getopt::Std qw/ getopts /;
sub HELP_MESSAGE {
my $fh = shift || *STDOUT;
print $fh qq%
Usage: $0 IMG_IN IMG_OUT
Cause deliberate errors in an image file (or any file).
@ftrain
ftrain / bing-gobble.pl
Created April 27, 2015 02:54
Get the counts for words on sites with bing!
#!/usr/bin/perl
# Copyright (c) 2015, Paul Ford, ford@ftrain.com
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@nibrahim
nibrahim / line-length-sort.el
Created October 22, 2010 10:34
Sort lines by length
(defun sort-lines-by-length (b e)
(interactive "r")
(save-excursion
(save-restriction
(narrow-to-region b e)
(let ((items (sort
(split-string
(buffer-substring (point-min) (point-max)) "[\n]")
(lambda(x y) (< (length x) (length y)))))
)
@rawsyntax
rawsyntax / js2-mode.el
Created May 31, 2012 21:19
js2-mode with better indentation
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
(add-to-list 'auto-mode-alist '("\\.json$" . js2-mode))
;; Use js-mode indentation in js2-mode, I don't like js2-mode's indentation
;;
;; thanks http://mihai.bazon.net/projects/editing-javascript-with-emacs-js2-mode
;; with my own modifications
;;
(defun my-js2-indent-function ()
@bwillis
bwillis / git_commands.zsh
Last active November 8, 2018 02:28
Git and Github commands I use via .zshrc
# Git commands
# ggh - git url: get the url to the current github repo (assumes it's the remote push server)
# ggbn - git branch name: get the name of the current branch
# ggwip - git wip: commit the current staged and unstaged files with a commit message of WIP
# ggundo - git undo: pull the last commit off as staged changes
# ggbh - git branch history: list the 6 recent branches by commit date
# ggbs - git branch smart history: list the 6 recent branches by commit date without master, staging or production
# ggbl - git branch last: get the last branch that is not master, staging or production
alias ggh="git remote -v 2> /dev/null | grep push | awk '{print \$2}' | sed 's/:/\//' | sed 's/git@\(.*\)\.git/https:\/\/\1/'"
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if(mutation.addedNodes.length > 0 && mutation.addedNodes[0].nodeName == "CANVAS"){
// do stuff after the sketch loaded
}
});
});
var config = { attributes: false, childList: true, characterData: false }
target = document.getElementById("myDiv")