Skip to content

Instantly share code, notes, and snippets.

View scottnath's full-sized avatar

Scott Nath scottnath

View GitHub Profile
@scottnath
scottnath / gist:11192834
Created April 22, 2014 20:17
Git: Set up remote branches locally
for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done
@scottnath
scottnath / text-shadow-mixin-HTML.html
Last active August 29, 2015 14:00
Generated by SassMeister.com.
<div class="awesome">Hammertime</div>
@scottnath
scottnath / gist:93dd9d3dae02aac7dbeb
Last active August 29, 2015 14:05
Angular service to talk to Drupal
## Service Script
define(['angular'], function (angular) {
'use strict';
angular.module('atlasApp.services.Drupal', ['restangular'])
.config(function(RestangularProvider){
RestangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
var extractedData;
@scottnath
scottnath / designer.html
Created January 2, 2015 23:33
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
@scottnath
scottnath / gist:be44614cc38f5dec4948
Created March 4, 2015 21:57
new clean git branch with --orphan
git checkout --orphan newbranch
git rm -rf .
rm -rf all-the-remaining-stuff-except-.git-directory
## should be a clean branch now
@scottnath
scottnath / gist:1d1b9dfd37314073bc83
Last active August 29, 2015 14:19
checkout remote branch to new local branch

git checkout -b remote_branch origin/remote_branch

@scottnath
scottnath / gist:24f987f335bb8a36000d
Last active August 29, 2015 14:20
Install a specific branch

Install specific branch via bower

bower install xxx#foo-branch

as in:

bower install git@github.com:pattern-library/pattern-importer.git#npm-module

Install specific branch via NPM

npm install git+ssh://git@github.com:pattern-library/pattern-importer.git#npm-module

@scottnath
scottnath / gist:9122cd1166a314502d45
Created May 22, 2015 17:56
print out an object in a jade template
// `symbol` is the object
each val, index in symbol
li= index + ': ' + val
@scottnath
scottnath / gist:bcf5f1ec55fcc8e1017f
Created May 27, 2015 16:19
dox parsing bug example
file: https://github.com/pattern-library/pattern-library-utilities/blob/master/lib/get-options.js
$ dox < lib/get-options.js
[
{
"tags": [
{
"type": "fileoverview",
"string": "Takes two options objects and merges them \n @author Scott Nath\n\n @requires NPM:lodash.merge",
"html": "<p>Takes two options objects and merges them<br /> @author Scott Nath</p><p> @requires NPM:lodash.merge</p>"
@scottnath
scottnath / gist:d10a03265b1ab1e05b09
Created June 2, 2015 20:19
start a python server
python -m SimpleHTTPServer 8000