This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>author</key> | |
<string>William D. Neumann</string> | |
<key>name</key> | |
<string>gazotem</string> | |
<key>settings</key> | |
<array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import plistlib | |
class Grammar(object): | |
def __init__(self, grammar): | |
self._grammar = grammar | |
self.names = [] | |
self.includes = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function() { | |
function addWmodeTransparent() { | |
var intervalID; | |
intervalID = setInterval(checkObject, 500); | |
function checkObject() | |
{ | |
if($('object').length){ | |
$('object').append('<param name="wmode" value="transparent">'); | |
clearInterval(intervalID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function windowCollisionBox() { | |
var width = window.innerWidth; | |
var height = window.innerHeight; | |
var grid = []; | |
rowNum = 0; | |
while(rowNum <= height) { | |
if(!rowNum || rowNum == height){ // First and Last Row | |
colNum = 0; | |
row = []; | |
while(colNum <= width) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: http://localhost:8080/image.jpg/100x50 | |
var http = require('http'); | |
var spawn = require('child_process').spawn; | |
http.createServer(function(req, res) { | |
var params = req.url.split('/'); | |
var convert = spawn('convert', [params[1], '-resize', params[2], '-']); | |
res.writeHead(200, {'Content-Type': 'image/jpeg'}); | |
convert.stdout.pipe(res); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/', function(req, res){ | |
var ua = req.header('user-agent'); | |
if(/mobile/i.test(ua)) { | |
res.render('mobile.html'); | |
} else { | |
res.render('desktop.html'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jQuery selectbox plugin | |
* | |
* Copyright (c) 2007 Sadri Sahraoui (brainfault.com) | |
* Licensed under the GPL license and MIT: | |
* http://www.opensource.org/licenses/GPL-license.php | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
* The code is inspired from Autocomplete plugin (http://www.dyve.net/jquery/?autocomplete) | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyHtmlHelper extends HtmlHelper { | |
public function activeLink($title, $url = null, $options = array(), $confirmMessage = false) { | |
if ($this->request->here == $url) { | |
if(isset($options['class'])) { | |
$options['class'] .= ' active'; | |
} else { | |
$options['class'] = 'active'; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interval: function (duration, callback){ | |
var baseline = undefined; | |
return { | |
run: function() { | |
if( baseline === undefined ) { | |
baseline = new Date().getTime(); | |
} | |
callback(); | |
var end = new Date().getTime(); | |
baseline += duration; |
OlderNewer