Skip to content

Instantly share code, notes, and snippets.

View daniellmb's full-sized avatar
🎯
Focusing

Danny daniellmb

🎯
Focusing
View GitHub Profile
@daniellmb
daniellmb / onerror.js
Last active July 12, 2020 13:30
Automagically look up JavaScript errors on Stack Overflow ;-)
window.onerror = function(message) {
top.location.href = 'http://stackoverflow.com/search?q=' +
encodeURIComponent(message + ' [js]');
};
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 3, 2024 12:32
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@rwaldron
rwaldron / cylon.coffee
Created December 2, 2013 22:35
Johnny-Five compared to Cylon: Hello
Cylon = require '../..'
Cylon.robot
work: ->
every 1.second(), ->
Logger.info("Hello, human!")
after 10.seconds(), ->
Logger.info "Impressive."
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");