Skip to content

Instantly share code, notes, and snippets.

View milcktoast's full-sized avatar
🍂
Making Growth (art game)

Ash Weeks milcktoast

🍂
Making Growth (art game)
View GitHub Profile
@milcktoast
milcktoast / Sea Sludge.tmTheme
Last active August 29, 2015 13:56
A dark theme for js, html, and (s)css.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Sea Sludge</string>
<key>gutterSettings</key>
<dict>
<key>background</key>
<string>#343d46</string>
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Aliases
alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
alias leftthird move screenOriginX;screenOriginY screenSizeX/3;screenSizeY
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY
alias rightthird move screenOriginX+screenSizeX/3+screenSizeX/3;screenOriginY screenSizeX/3;screenSizeY
@mixin border-top-radius($radius) {
border-top-left-radius: $radius;
border-top-right-radius: $radius;
}
@mixin border-right-radius($radius) {
border-top-right-radius: $radius;
border-bottom-right-radius: $radius;
}
@mixin border-bottom-radius($radius) {
border-bottom-left-radius: $radius;
App.IndexRoute = Ember.Route.extend({
setupController : function (controller, model) {
controller.set('isTransitioning', true);
Em.run.later(function () {
controller.set('model', model);
Em.run.schedule('afterRender', controller, 'set', 'isTransitioning', false);
}, 300);
}
});
@milcktoast
milcktoast / index.js
Created May 18, 2014 22:05
Node package to unfollow all twitter followings
var CONSUMER_KEY = '';
var CONSUMER_SECRET = '';
var ACCESS_TOKEN = '';
var ACCESS_SECRET = '';
var SCREEN_NAME = '';
var fs = require('fs');
var queue = require('queue-async');
var twitterAPI = require('node-twitter-api');
var twitter = new twitterAPI({
@milcktoast
milcktoast / blender-upgrade
Last active August 29, 2015 14:03
Blender Upgrade
#! /bin/sh
# usage:
# $ blender-upgrade $version
VERSION=$1
SRC=~/Dropbox/config/blender/
DEST=/Applications/Blender/Blender.app/Contents/Resources/$VERSION/scripts/
cd $SRC;
for d in *
@milcktoast
milcktoast / circleHeightfield.js
Created October 20, 2014 16:09
p2 heightfield interpolation
// Overwrite p2.Narrowphase.prototype.circleHeightfield
// Solves circle / heightfield collision with interpolated curve
// e.g. http://jsbin.com/mifixo/9/
/*jshint camelcase:false, maxparams: 15, maxcomplexity:15*/
var vec2 = p2.vec2;
var add = vec2.add;
var sub = vec2.sub;
var circleHeightfield_candidate = vec2.create();
var get = Ember.get;
var set = Ember.set;
var HardLocation = App.HardLocation = Ember.Object.extend({
init : function() {
return set(this, 'location', get(this, 'location') || window.location);
},
getURL : function() {
var location = get(this, 'location');
@milcktoast
milcktoast / addons.css
Created June 26, 2015 19:02
liquid-fire@0.19.4 w/ ember@1.11.3 built with ember-giftwrap@0.0.2
.liquid-container {
position: relative;
overflow: hidden;
/* without this, overflow:hidden won't take effect because the things
we're trying to hide are on a separate accelerated
context. Also, this prevents a tiny vertical jump when the
content switches to accelerated. */
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
@milcktoast
milcktoast / git-stats.sh
Last active August 29, 2015 14:25
Author contribution stats (+/-) [with git and awk]
# /bin/sh
IFS=$'\n'
authors=$(git log --format='%aN' | sort -u)
for author in $authors
do
echo $author | awk 'BEGIN { FS = "\" " }; { printf "%-20s ", $1 }'
git log --author="$author" --pretty=tformat: --numstat |
awk '{ add += $1; subs += $2; edits += $1 + $2 } END { printf "%10d (+) %10s (-) %10s (+/-) \n", add, subs, edits }'