Skip to content

Instantly share code, notes, and snippets.

View chrisabrams's full-sized avatar

Chris Abrams chrisabrams

  • Austin, TX
View GitHub Profile
@chrisabrams
chrisabrams / bundleAnalysis.js
Created September 23, 2017 16:01 — forked from kanavarora/bundleAnalysis.js
Simple utility to track your bundle/chunk sizes with each release
/*
Utility to analyze bundle chunks over versions.
Assumes: webpack has already created the bundle summary json file -> stats.json
Parameters:
version: (Optional) a string that labels the current bundle with the version
provided and saves the summary in a csv file.
Output:
If run the first time, generates a csv file bundleAnalaysis.csv, which

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=unknown&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

var gulp = require('gulp');
var source = require('vinyl-source-stream');
var watchify = require('watchify');
var livereload = require('gulp-livereload');
var hbsfy = require("hbsfy").configure({
extensions: ["html"]
});
gulp.task('watch', function() {
$ = jQuery
queues = {}
running = false
queue = (name) ->
name = 'default' if name is true
queues[name] or= []
next = (name) ->
@chrisabrams
chrisabrams / micro-mustache.js
Created June 28, 2012 05:36 — forked from topliceanu/micro-mustache.js
John Resig's Micro Template with changed tags from <%=, %> into more mustache-esque {{= and }}
// Simple JavaScript Templating
// John Resig - http://ejohn.org/ - MIT Licensed
(function(){
var cache = {};
this.tmpl = function tmpl(str, data){
// Figure out if we're getting a template, or if we need to
// load the template - and be sure to cache the result.
var fn = !/\W/.test(str) ?
cache[str] = cache[str] ||
@chrisabrams
chrisabrams / rabbitmq-install-osx.md
Created May 1, 2012 17:32 — forked from jch/rabbitmq-install-osx.md
Troubleshooting RabbitMQ installation on OSX via homebrew

Troubleshooting RabbitMQ installation on OSX via homebrew

brew update
brew install rabbitmq

To see if rabbitmq is running after following the installation instructions:

launchctl list | grep rabbit
> 48303	-	homebrew.mxcl.rabbitmq
<VirtualHost 1.2.3.4:80>
ServerAdmin [email protected]
ServerName example.com
DocumentRoot /srv/www/example.com/public/
ErrorLog /srv/www/example.com/logs/error.log
CustomLog /srv/www/example.com/logs/access.log combined
ProxyPass / http://127.0.0.1:8100/
ProxyPassReverse / http://127.0.0.1:8100/
<Proxy *>
@chrisabrams
chrisabrams / build.sh
Created February 20, 2012 20:04 — forked from badsyntax/build.sh
An example PHP & BASH Post-Receive github web hook to package projects
#! /usr/bin/env bash
#clone the repo
git clone -q "${1}" "clones/${2}"
cd "clones/${2}"
#update the submodules (how do we handle errors here?)
git submodule --quiet update --init --recursive
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.
@chrisabrams
chrisabrams / anchor.js
Created January 9, 2012 18:52 — forked from draeton/anchor.js
Anchor - A URL parsing utility
/**
* Anchor - A URL parsing utility
*
* Copyright 2012, Matthew Cobbs
* MIT licensed
*
* Methods:
*
* getSearchVars - returns a key-value object with the parameters in the URL search
* setSearchVars(o) - sets parameters using a key-value object in the URL search