This file contains hidden or 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(){ | |
var noop = function noop(){}; | |
var liveConsole = console; | |
var consoleMethodNames = 'assert assert clear count debug dir dirxml error group groupCollapsed groupEnd info log markTimeline profile profileEnd table time timeEnd timeStamp timeline timelineEnd trace warn'.split(' '); | |
var deadConsole = {}; | |
for (var i = consoleMethodNames.length - 1; i >= 0; i--) { | |
deadConsole[consoleMethodNames[i]] = noop; | |
}; | |
window.__debug = function (enabled){ | |
if(enabled){ |
This file contains hidden or 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
/* | |
@param originx, originy - percentage values | |
*/ | |
function drawImageRot(ctx, img, x, y, width, height, radians, originx, originy) { | |
ctx.save(); | |
ctx.translate(x, y); | |
ctx.rotate(radians); | |
ctx.drawImage(img, -originx * width, -originy * width, width, height); | |
ctx.restore(); | |
} |
This file contains hidden or 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 | |
# @author - positlabs | |
# @github - https://github.com/positlabs/ | |
# @blog - http://pixel-fiend.positlabs.com/ | |
# | |
# Debugger for Android running Chrome. | |
# | |
# First, set up your device and computer to work with adb: http://developer.android.com/tools/help/adb.html | |
# |
This file contains hidden or 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
Vignette = function (canvas) { | |
var alpha = .7, | |
context, | |
visible, | |
data; | |
(function initView() { | |
context = canvas.getContext("2d"); |
This file contains hidden or 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
# Add this to your .htaccess file to enable gzip compression. Should speed up load times by ~70% | |
# BEGIN GZIP | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/json application/x-javascript application/javascript | |
</ifmodule> | |
# END GZIP |
This file contains hidden or 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
.stitches-icon(@x: 0, @y: 0) { | |
@origUnit: 200px; | |
@xUnits: 8; | |
@yUnits: 7; | |
@width: 1632px; | |
@height: 1428px; | |
@pWidth: @width - @origUnit; | |
@pHeight: @height - @origUnit; | |
background-size: percentage(@xUnits) percentage(@yUnits); |
This file contains hidden or 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
import os | |
import shutil | |
def renameByType(type, toType, dir): | |
for root, dirs, files in os.walk(dir): | |
for f in files: | |
filename, filetype = os.path.splitext(f) | |
if(f.find(type) != -1): | |
print os.path.join(root, f), " -> ", f.replace(type, toType) | |
shutil.move(os.path.join(root, f), os.path.join(root, f.replace(type, toType))) |
This file contains hidden or 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
/** | |
* Simple Java logger | |
* | |
* new Log("hey", "guys"); | |
* >>> hey guys | |
* | |
* Separator defaults to a space, but you can specify a new separator | |
* Log.separator(" you "); | |
* new Log("hey", "guys"); | |
* >>> hey you guys |
This file contains hidden or 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
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app |
This file contains hidden or 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
echo "attempting to kill all PTPCamera processes..." | |
# releases camera from the OS so we can use it | |
killall PTPCamera | |
gphoto2 \ | |
--folder "time-lapse" \ | |
--capture-image-and-download \ | |
--set-config "/main/imgsettings/imageformat=5" \ | |
--filename "frames/"%Y%m%d%H%M%S.%C \ |
OlderNewer