Skip to content

Instantly share code, notes, and snippets.

View jessehattabaugh's full-sized avatar
🤠
pew pew

Jesse Hattabaugh jessehattabaugh

🤠
pew pew
View GitHub Profile
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@tbranyen
tbranyen / events.js
Last active May 10, 2024 14:54
Rethinking events using ES6 (https://tbranyen.com/events)
const bus = {};
const get = e => (bus[e] = bus[e] || new Set());
export const listeners = new Proxy(bus, { get });
export const emit = (e, ...args) => listeners[e].forEach(fn => fn(...args));
@xjamundx
xjamundx / blog-webpack-2.md
Last active April 21, 2024 16:20
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@deathcap
deathcap / gist:898bec7260a0b0dbf5cd
Last active August 29, 2015 14:15
browserifying node-minecraft-protocol yggdrasil auth -> superagent -> mime, fs.readFileSync mime type reading error
try.js:
var mime = require('mime');
browserify try.js > b.js
<script src="b.js"></script>
Uncaught TypeError: undefined is not a function
b.js:2621 module.exports.load
b.js:2662 (anonymous function)
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@coderaiser
coderaiser / c9kill.sh
Created November 28, 2012 16:07
Kill active node process in cloud9 ide
# print finded process
ProcessList=`ps ax|grep node-openshift`
echo $ProcessList
# getting pid of process
PID=`echo "${ProcessList}"|grep -v grep|awk '{print $1}'`
echo $PID
#kill it
if test ! $PID
then echo 'process not found'
else kill -9 $PID && echo 'killed process'