Skip to content

Instantly share code, notes, and snippets.

@savage69kr
savage69kr / tumblr theme
Created April 20, 2012 14:56 — forked from teamon/tumblr theme
tumblr theme
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="{MetaDescription}" />
<meta name="text:Disqus Shortname" content="" />
<title>
{block:PostTitle}{PostTitle} / {/block:PostTitle}{Title}
@savage69kr
savage69kr / node.js_express
Created April 28, 2012 08:32 — forked from outsideris/server.js
express vhost example
var express = require('express'),
site1 = express.createServer(),
site2 = express.createServer(),
site_vhosts = [],
vhost;
site_vhosts.push(express.vhost('domain1.com', site1));
site_vhosts.push(express.vhost('domain2.com', site2));
vhost = express.createServer.apply(this, site_vhosts);
@savage69kr
savage69kr / .gitignore
Created May 1, 2012 14:14 — forked from bellbind/.gitignore
[nodejs][heroku][facebook]create facebook app on heroku with (newer version) nodejs
node_modules
@savage69kr
savage69kr / index.html
Created May 1, 2012 14:15 — forked from bellbind/index.html
[facebook][javascript][nodejs]using facebook javascript sdk
<!doctype html>
<html>
<head>
<title>Facebook Canvas Page with JavaScript SDK</title>
</head>
<body>
<h1>Hello Facebook JS SDK</h1>
<!-- put fnb-root and initialize script for using Facebook JavaScript SDK -->
<div id="fb-root"></div>
<script>
@savage69kr
savage69kr / block-sprites.css
Created May 12, 2012 12:48 — forked from sli/block-sprites.css
Minecraft item/block CSS sprites (1.0)
/* Uses this image: http://dl.dropbox.com/u/5768678/minecraft-sprites/blocks.png */
.block {
background-image: url('blocks.png');
width: 32px;
height: 32px;
}
#cobblestone { background-position: 0px 0px; }
#stone-bricks-1 { background-position: 0px -32px; }
#lapis-lazuli-block { background-position: 0px -64px; }
@savage69kr
savage69kr / DebugConsole.cs
Created May 13, 2012 12:09 — forked from darktable/DebugConsole.cs
Unity3D: Heavily modified version of Jeremy Hollingsworth's DebugConsole script.
#define DEBUG_CONSOLE
#define DEBUG_LEVEL_LOG
#define DEBUG_LEVEL_WARN
#define DEBUG_LEVEL_ERROR
#if (UNITY_EDITOR || DEVELOPMENT_BUILD)
#define DEBUG
#endif
#if (UNITY_IOS || UNITY_ANDROID)
@savage69kr
savage69kr / README
Created June 24, 2012 13:49 — forked from joelambert/README
Drop in replacements for setTimeout()/setInterval() that makes use of requestAnimationFrame() where possible for better performance
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
@savage69kr
savage69kr / RequestAnimationFrame.js
Created June 24, 2012 13:49 — forked from mrdoob/RequestAnimationFrame.js
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
@savage69kr
savage69kr / flipFont.js
Created July 6, 2012 15:51
Add the possibility to flip fonts in impact
// Add the possibility to flip fonts in impact
// This adds two parameters to the draw method of ig.Font
// Use it like this:
// this.font.draw( 'It Works!', x, y, ig.Font.ALIGN.CENTER, true, true );
// The last two values are the new parameters, the first flips horizontally and the second vertically
// Use like you want to, just don't blame me for anything.
ig.module( 'plugins.flipFont' )
.requires(
@savage69kr
savage69kr / audiosprite.js
Created July 6, 2012 15:54 — forked from remy/audiosprite.js
An example of how an audio sprite can be used (includes fixes for iOS)
function Track(src, spriteLength, audioLead) {
var track = this,
audio = document.createElement('audio');
audio.src = src;
audio.autobuffer = true;
audio.load();
audio.muted = true; // makes no difference on iOS :(
/* This is the magic. Since we can't preload, and loading requires a user's
input. So we bind a touch event to the body, and fingers crossed, the