Skip to content

Instantly share code, notes, and snippets.

Best Food

Asian

  • Ms Chi Cafe
  • Tokyo Guild
  • K-Zo (decent sushi for lunch)

Mexican

  • Baja California Taco
  • EK Valley
@pr1ntr
pr1ntr / .travis.yml
Created March 9, 2018 21:48
how to condition?
- provider: script
skip_cleanup: true
script: scripts/deploy.sh
on:
all_branches: true
condition:
- "$DEST == production"
- "$DEST == staging"
[["006","007","008","009","010","011","012","013","014","015","016","017","018","019","020","021","022","023","024","025","026","027","028","029","030","031","032","033","034","035","036","037","038","039","040","041","042","043","044","045","046","047","048","049","050","051","052","053","054","055","056","057","058","059","060","061","062","063","064","065","066","067","068","069","070","071","072","073","074","075","076","077","078","079","080","081","082","083","084","085","086","087","088","089","090","091","092","093","094","095","096","097","098"],["100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176",
@pr1ntr
pr1ntr / zips.json
Created February 3, 2017 00:36
USA Zip Code Prefixes - Dec 2016 - src: https://en.wikipedia.org/wiki/List_of_ZIP_code_prefixes
[["006","007","008","009","010","011","012","013","014","015","016","017","018","019","020","021","022","023","024","025","026","027","028","029","030","031","032","033","034","035","036","037","038","039","040","041","042","043","044","045","046","047","048","049","050","051","052","053","054","055","056","057","058","059","060","061","062","063","064","065","066","067","068","069","070","071","072","073","074","075","076","077","078","079","080","081","082","083","084","085","086","087","088","089","090","091","092","093","094","095","096","097","098"],["100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176",
{
entry: {
app: [path.normalize(`${cwd}/src/js/app.js`)],
vendor: vendors
},
output: {
path: path.normalize(`${cwd}/public/js`),
publicPath: '/js/',
filename: '[name].js',
function vector(n) {
let arr = Array.apply(null, Array(n));
return arr.map((x, i) => i);
}
@pr1ntr
pr1ntr / async.js
Created March 25, 2016 20:55
async / await vs promise
/**
* getSomeShit()
* returns Promise
* */
function getSomeShit() {
return fetch('http://some.api/endpoint', {method:"GET", header:{'content-type': 'application/json' }}).then(r => r.json())
}
'use strict';
let webpack = require('webpack');
let shared = require('./webpack.config.shared');
module.exports = {
entry: shared.entry,
output: shared.output,
externals: shared.external,
module: {
stage all changedd files for a commit

git add .

stage specific file for a commit

git add /path/to/file

for some reason you want to unstage

git reset unstage all files
git reset /path/to/file unstage specific file

@pr1ntr
pr1ntr / imageSequenceLoader.js
Created February 11, 2016 19:43
Image Sequence Loader using a Generator
import http from './http';
const mapLoadImage = src => loadImage(src);
function loadImage(src) {
return new Promise((r, f) => {
let image = new Image();