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
| 'use strict'; | |
| var gulp = require('gulp'); | |
| var refresh = require('gulp-livereload'); | |
| var livereload = require('tiny-lr'); | |
| var server = livereload(); | |
| var concat = require('gulp-concat'); | |
| var hogan = require('gulp-hogan-compile'); | |
| gulp.task('livereload-server', function () { |
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
| var xLBD = {}; | |
| xLBD.c = function (){ | |
| xLBD.f = unescape(document.querySelector("[flashvars]").getAttribute("flashvars")).substring(7); | |
| xLBD.f = JSON.parse(xLBD.f.substring(0, xLBD.f.lastIndexOf("}") + 1)).video_data[0].hd_src; | |
| xLBD.a = "<div style='position:absolute;top:100px;height:300px;left:15%;background:#fff;border:10px solid #000;font-size:5em;padding:100px;'>Click <a download='lookback.mp4' href='"+xLBD.f+"'>here<\/a> to download your lookBack video.</div>"; | |
| document.body.innerHTML += xLBD.a; | |
| } | |
| if(document.readyState == "complete") | |
| xLBD.c(); | |
| else window.onload = xLBD.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
| import urllib | |
| import urllib2 | |
| try: | |
| import json | |
| except: | |
| import simplejson as json | |
| # First, Get your API Key for free from: api.animetrics.com | |
| # See at the very below section for HOWTO. | |
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
| /*! | |
| * gulp | |
| * $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
| */ | |
| // Load plugins | |
| var gulp = require('gulp'), | |
| sass = require('gulp-ruby-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| cssnano = require('gulp-cssnano'), |
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
| #!/bin/bash | |
| # where to store the sparse-image | |
| WORKSPACE=~/Documents/workspace.dmg.sparseimage | |
| create() { | |
| hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE} | |
| } | |
| detach() { |
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
| # ---------------------------------------------------------------------- | |
| # /PUBLIC folder .htaccess | |
| # ---------------------------------------------------------------------- | |
| # This .htaccess file is recommended | |
| # to be placed at root/public folder | |
| # of your Laravel powered application | |
| # ---------------------------------------------------------------------- | |
| # This file works with Laravel 3 and 4 | |
| # ---------------------------------------------------------------------- | |
| # Turning on the rewrite engine is necessary for the following rules and |
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
| TEMPLATE_CONTEXT_PROCESSORS = ( | |
| ... | |
| 'app.context_processors.global_settings', | |
| ) |
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
| from django.conf import settings | |
| def global_settings(request): | |
| # return any necessary values | |
| return { | |
| 'GOOGLE_ANALYTICS': settings.GOOGLE_ANALYTICS, | |
| 'GOOGLE_API_KEY': settings.GOOGLE_API_KEY | |
| } |
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 drawMouseSpeedDemo() { | |
| var mrefreshinterval = 500; // update display every 500ms | |
| var lastmousex=-1; | |
| var lastmousey=-1; | |
| var lastmousetime; | |
| var mousetravel = 0; | |
| var mpoints = []; | |
| var mpoints_max = 30; | |
| $('html').mousemove(function(e) { | |
| var mousex = e.pageX; |
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
| IE6 Only | |
| ================== | |
| _selector {...} | |
| IE6 & IE7 | |
| ================== | |
| *html or { _property: } | |
| IE7 Only | |
| ================== |