Remove References to Remote branches that don't exist
git remote prune origin
Delete all local branches that don't have a remote
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
// log client side errors | |
window.onerror = function (message, url, lineNumber) { | |
// line number is useless since it is compiled | |
$.post(Kin.RootUrl + 'api/log/javascripterror', { message: message }, function (resp) { | |
}); | |
return false; // continue to call the default handler | |
}; |
var el = document.createElement('script'); | |
el.src = "https://cdn.jsdelivr.net/lodash/4.11.1/lodash.min.js"; | |
el.type = "text/javascript"; | |
document.head.appendChild(el); | |
// Use the following in a bookmarklet: | |
javascript:var el=document.createElement('script');el.src="https://cdn.jsdelivr.net/lodash/4.11.1/lodash.min.js";el.type = "text/javascript";document.head.appendChild(el); |
define(function (require) { | |
var module; | |
// Setup temporary Google Analytics objects. | |
window.GoogleAnalyticsObject = "ga"; | |
window.ga = function () { (window.ga.q = window.ga.q || []).push(arguments); }; | |
window.ga.l = 1 * new Date(); | |
// Immediately add a pageview event to the queue. |
// Retrieve the object from storage onReady | |
var autosave = localStorage.getItem('file'); | |
// parses the string (btw. its UTF-8) | |
var text = JSON.parse(autosave); | |
//modifies the textarea with the id="inputTextArea" | |
$("textarea#inputTextArea").val(text); | |
// Autosave on keystroke works in offline mode |
Remove References to Remote branches that don't exist
git remote prune origin
Delete all local branches that don't have a remote
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
function checkvisible( elm ) { | |
var vph = $(window).height(), // Viewport Height | |
st = $(window).scrollTop(), // Scroll Top | |
y = $(elm).offset().top; | |
// test if element is on screen or has been scrolled past | |
return (y < (vph + st)); | |
// test if element is on screen | |
// return (y > st) && (y < (vph + st)); |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> |
// … | |
.transition() | |
.delay(function(d, i) { | |
return i / dataset.length * 1000; // <-- Where the magic happens | |
}) | |
.duration(500) | |
// … |
input::-moz-focus-inner { | |
border: 0; | |
padding: 0; | |
margin-top:-2px; | |
margin-bottom: -2px; | |
} |