Skip to content

Instantly share code, notes, and snippets.

Eric Miller SimplGy

Block or report user

Report or block SimplGy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
christophercliff / Makefile
Created Dec 14, 2012
Makefile for deploying a Wintersmith static site to Github Pages without exposing the source (assumes you're using the default build directory).
View Makefile
rm -rf ./build
wintersmith build
cd ./build && \
git init . && \
git add . && \
git commit -m "Deploy"; \
git push "{YOUR NAME}/{YOUR REPO}.git" master:gh-pages --force && \
rm -rf .git
chrislkeller / import_json_appsscript.js
Last active May 13, 2020
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
View import_json_appsscript.js
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
View animationPlay
@function foo-shadow($color, $size, $layers: 1) {
$transparency: (10 - $layers) * .1;
$opts: ();
@for $i from 1 to $layers {
$opts: append($opts, 0 0 0 ($size * $i) transparentize($color, $transparency + (.1 * $i)), comma);
@return $opts;
$colorGood: lawngreen;
jonschlinkert /
Last active May 24, 2020
A better markdown cheatsheet.
thebyrd / magicMethod.js
Last active Dec 19, 2015
Adds jQuery style getters and setters to a given constructor function.
View magicMethod.js
Function.prototype.method = function (name, func) {
this.prototype[name] = func;
return this;
var getParamNames = function (func) {
var funStr = func.toString()
return funStr.slice(funStr.indexOf('(')+1, funStr.indexOf(')')).match(/([^\s,]+)/g)

Rough outline of asset deployment strategy


  • Separate front end "client" deployment and build process from backend deployment.
  • Not necessarily have to create two completely distinct applications (because of authentication difficulties etc), but could go in that direction if needed.
  • Migratable to from the asset pipeline & compatible with rails.
  • Support coffeescript, sass compilation.
  • Allow lightweight "staging" clients to be deployed using the existing backend. Ideally even use the production backend with a development client.
  • Fast compilation and deployment.
View tyga.js
// Make it Nasty
function increment (i) {
i ^= (i & ~-~i) | (~i & -~i)
return i
yyx990803 /
Last active May 1, 2020
npm list only top level modules.
alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
jelbourn / api-provider.js
Last active Jan 13, 2020
Example of using an angular provider to build an api service. Subject of August 20th 2013 talk at the NYC AngularJS Meetup. in jsbin:
View api-provider.js
* Example of using an angular provider to build an api service.
* @author Jeremy Elbourn (@jelbourn)
/** Namespace for the application. */
var app = {};
branneman /
Last active May 24, 2020
Better local require() paths for Node.js

Better local require() paths for Node.js


When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

You can’t perform that action at this time.