Skip to content

Instantly share code, notes, and snippets.

Way Spurr-Chen wayspurrchen

Block or report user

Report or block wayspurrchen

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
View duplicate_id :(
NOTE duplicate id 1545839157538981467[limit]=10&page[offset]=10
wayspurrchen / iifestrip.js
Created Sep 15, 2016
Strip IIFEs from files in a directory. You'll need minimist and recursive-readdir. Doesn't work on IIFEs that have args passed in
View iifestrip.js
var fs = require('fs');
var path = require('path');
var recursive = require('recursive-readdir');
var argv = require('minimist')(process.argv.slice(2));
var iifepath = path.resolve(process.cwd(), argv.path);
function isIIFEStart (string) {
// whatever you don't know my life
return string === '(function () {' ||
wayspurrchen /
Created Sep 2, 2016 — forked from SuperPaintman/
NPM install for low RAM machins. And "npm install ... killed" problem
# Author: SuperPaintman <>
# Constants
View gist:3b86cff84cdafca6e9e6
var categories = [
id: 0,
name: 'Shoes',
imageUrl: 'alkfaekfja0-43i'
id: 1,
name: 'Clothing',
imageUrl: 'someshit'
wayspurrchen / injector.js
Last active Jan 9, 2016
demo code showing how AngularJS 1.6 injectors (probably) magically inject services by name
View injector.js
* This gist shows how you can inject other functions/variables
* into a function only by name. I imagine this is probably something
* like how AngularJS 1.6 does it, but Angular relies on an internal
* list of registered modules instead of just whatever's floating
* around the namespace, which is dangerous.
// Things to inject
function LoggerOne () {
wayspurrchen / git
Last active Jul 3, 2019
Useful Git Techniques
View git


Show file at certain commit

git show <hash>:<file>

Show history of a file

git log -p <filename>

wayspurrchen / The Technical Interview Cheat
Last active Aug 29, 2015 — forked from TSiege/The Technical Interview Cheat
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
View promiseretry.js
function retry ( promiseToRetry, maxRetries ) {
return new Promise( function ( resolve, reject ) {
promiseToRetry.then( function ( resolve ) {
resolve( result );
} ).catch( function ( e ) {
if ( maxRetries > 0 ) {
return retry( promiseToRetry, maxRetries - 1 );
} else {
reject( e )
wayspurrchen / gist:c688b2d9685418901791
Last active Aug 29, 2015
Grab and list all (unique) classes on page
View gist:c688b2d9685418901791
var cls = []; document.querySelectorAll('*'), 0 ).forEach( function ( el ) {
cls = cls.concat( el.classList, 0 ) );
} );
cls = cls.reduce( function ( p, c ) {
if ( p.indexOf( c ) < 0 ) p.push( c );
return p;
}, [] );
console.log( cls );
You can’t perform that action at this time.