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
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
I wanted to outline a potential system for organizing Sass declarations. Since Alphabetization has also been a hot topic (of which I am in favor), it outlines how things such as nesting, @extend
, @include
, and comments would all fall into the same system. This is by no means a perfect system - but after using Sass for a variety of different things, this is the organization I've found that can deal most easily with edge cases.
Please feel free to critique / edit / etc.
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)); |
// Helvetica Font Stack | |
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; | |
font-weight: 300; | |
// Times New Roman-based stack | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
// Modern Georgia-based serif stack | |
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif; |
<!-- Remember this needs to be an icon bundle with 16px and 32px in it --> | |
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon"> | |
<!-- iOS/Android --> | |
<meta name="apple-mobile-web-app-title" content="FIXME"> | |
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/apple-touch-icon-152x152-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/apple-touch-icon-120x120-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/apple-touch-icon-76x76-precomposed.png"> |
// 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 | |
}; |
// Reusable x-browser XMLHttpRequest | |
function getHTTPObject() { | |
var xhr = false; | |
if (window.XMLHttpRequest) { | |
xhr = new XMLHttpRequest(); | |
} else if (window.ActiveXObject) { | |
try { | |
xhr = new ActiveXObject("Msxml2.XMLHTTP"); | |
} catch(e) { | |
try { |
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); |
var MyModule = (function() { | |
var ModuleExport = function() { | |
// Do constructor stuff. | |
}; | |
ModuleExport.prototype = { | |
doStuff: function( param ) { | |
// do stuff, then... | |
this.doOtherStuff(); |
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. |