Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View awayken's full-sized avatar

Miles Rausch awayken

View GitHub Profile
@awayken
awayken / Split-File.ps1
Created June 25, 2013 20:10
Split files using Powershell, modified from: http://stackoverflow.com/a/11010158/215200
# Modified from: http://stackoverflow.com/a/11010158/215200
$fromFolder = "D:\FOLDER\"
$rootName = "FILENAME"
$ext = "EXT"
$from = "{0}{1}.{2}" -f ($fromFolder, $rootName, $ext)
$fromFile = [io.file]::OpenRead($from)
$upperBound = 100MB
function t(s,d){
for(var p in d)
s=s.replace(new RegExp('{'+p+'}','g'), d[p]);
return s;
}
@awayken
awayken / dabblet.css
Created March 4, 2013 22:56
Design From the Inside Out With CSS Min-Content
/**
* Design From the Inside Out With CSS Min-Content
* http://demosthenes.info/blog/662/Design-From-the-Inside-Out-With-CSS-MinContent
*/
figure {
border: 2px solid black;
background: #cae9b8;
margin: 0 auto 1em auto;
}
@awayken
awayken / A.md
Last active December 12, 2015 03:49
The Chicka Chicka Boom Boom Chronicles

A

Ham, Again

"God-damned ham, again," sighed A, surveying the separated parts of his sandwich. "I guess it's too much to ask that he remember that I hate ham." A dropped the pieces of meal back onto their plastic sandwich bag. He ruffled through his lunch bag and considered jumping back into the lunch line, but then he remember that the school had a new "No credits" policy. His pockets, he knew, were empty, and that just made him resent his father even more.

B lowered his gaze. A was in a dark mood, and B always felt an overwhelming urge to defuse A's anger. It wasn't that A was dangerous; it was more that B couldn't stand conflict.

"Maybe he didn't know," B tried.

@awayken
awayken / rAF.js
Created January 10, 2013 03:26 — forked from paulirish/rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
@awayken
awayken / dabblet.css
Created November 29, 2012 23:06
Instagram Loader
/**
* Instagram Loader
*/
.progress-bar {
border: 1px solid silver;
border-radius: 0.35em;
height: 10px;
margin: 150px auto 0 auto;
padding: 1px;
width: 80%;
@awayken
awayken / included_file.less
Created November 6, 2012 18:47
Mixin and Variable Cascading in LESS
@value: #000;
.mixin {
color: @value;
}
@value: #333;
.parametric() {
color: @value;
@awayken
awayken / Application.cfc
Created November 4, 2012 04:44
Shortcut Functions
component displayName="Shortcut Functions application" output="false" {
this.name = "ShortcutFunctions";
public void function onRequest( required template ) {
param name="url.language" default="en";
variables.__ = shortcutGetTranslation;
include template;
}
@awayken
awayken / dabblet.css
Created October 10, 2012 18:06
WNYC logo
/****
* WNYC logo
* Reference: http://www.wnyc.org/
****/
* {
line-height: 1;
margin: 0;
padding: 0;
}
body {
@awayken
awayken / sosumi.html
Created September 13, 2012 03:24
From the footer on http://www.apple.com/
<div class="sosumi">
<p class="copyright">Copyright © 2012 Apple Inc. All rights reserved.</p>
<ul class="piped">
<li><a href="/legal/" class="first">Terms of Use</a></li>
<li><a href="/legal/privacy/">Privacy Policy</a></li>
</ul>
<div id="worldwide">
<a href="/choose-your-country/">
<img src="http://images.apple.com/global/elements/flags/22x22/usa.png" alt="United States of America" height="22" width="22" />
<span class="more">Choose your country or region</span>