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
| define(function (require, exports, module) { | |
| /** | |
| * | |
| * simple stagger function | |
| * | |
| * TODO: add option for a timing function... will require changing @arg interval to duration | |
| * | |
| * */ | |
| return function (targets, interval, action, delay) { |
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
| /** | |
| @HashRouter: Singleton hash router object. | |
| // define onroute function | |
| HashRouter.onroute = function(hash){} | |
| // start the router | |
| HashRouter.start(); |
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
| /** | |
| Event broadcasting that follows the on / off / trigger pattern | |
| @arg obj: optional object to extend with events. NOTE: this event system only listens to events sent with .trigger. | |
| dom events will not be listened for. To avoid confusion, you probably shouldn't use this on dom elements. | |
| var e = new Events(); | |
| e.on("eventname", callbackFunc); // add event listener | |
| e.off("eventname", callbackFunc); // rm event listener |
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 \ |
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
| /** | |
| * 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
| 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
| .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
| # 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
| Vignette = function (canvas) { | |
| var alpha = .7, | |
| context, | |
| visible, | |
| data; | |
| (function initView() { | |
| context = canvas.getContext("2d"); |