Skip to content

Instantly share code, notes, and snippets.

View daniellmb's full-sized avatar
🎯
Focusing

Danny daniellmb

🎯
Focusing
View GitHub Profile
@daniellmb
daniellmb / gitflow-breakdown.md
Created November 7, 2019 20:04 — forked from JamesMGreene/gitflow-breakdown.md
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

Keybase proof

I hereby claim:

  • I am daniellmb on github.
  • I am daniellamb (https://keybase.io/daniellamb) on keybase.
  • I have a public key whose fingerprint is BA5A C5A0 1FFA 602E FF54 DC4C 98AF D67C 1302 1D2A

To claim this, I am signing this object:

@daniellmb
daniellmb / calc-rem.js
Last active November 3, 2023 18:28
PX-to-REM Calculator
(function($) {
var result = $('#result');
var base = $('#base');
var list = $('#list');
$('#calc').click(function() {
var baseVal = base.val();
var px = list.val().split(',');
var html = [];
$.each(px, function(i, v) {
var px = parseInt(v);
@daniellmb
daniellmb / anchor-style.css
Last active February 19, 2016 19:14
Dynamically inject heading links
/* unobtrusively style deep-linking heading anchors */
.anchor {
color: gray;
display: inline-block;
margin-left: -1rem;
opacity: 0;
padding-right: 0.1rem;
-webkit-transition: opacity cubic-bezier(0,1,.35,.96) 1s;
-moz-transition: opacity cubic-bezier(0,1,.35,.96) 1s;
-ms-transition: opacity cubic-bezier(0,1,.35,.96) 1s;
@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]');
};
@daniellmb
daniellmb / Camelcase2Hyphencase.js
Created April 7, 2015 18:56
Convert Camelcase To Hyphencase In Just Seventy Bytes
'wowConvertCamelcaseToHyphencaseInJustSeventyBytes'.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase();
@daniellmb
daniellmb / closure_linter_error_numbers.py
Created June 5, 2014 17:32
Closure Linter Reference
# "File-fatal" errors - these errors stop further parsing of a single file
FILE_NOT_FOUND = -1
FILE_DOES_NOT_PARSE = -2
# Spacing
EXTRA_SPACE = 1
MISSING_SPACE = 2
EXTRA_LINE = 3
MISSING_LINE = 4
ILLEGAL_TAB = 5
@daniellmb
daniellmb / yield.js
Created April 11, 2013 18:09
Modernizr feature detection check for native yield support.
define(['Modernizr'], function( Modernizr ) {
// native yield support.
Modernizr.addTest('yield', (function(){try{yield;}catch(e){}}())!==undefined);
});
@daniellmb
daniellmb / classic.js
Last active December 14, 2015 15:59
Classic "Holy Grail" inheritance pattern using an immediate function to store the proxy.
var inherit = (function () {
var proxy = function () {};
return function (child, parent) {
proxy.prototype = parent.prototype;
child.prototype = new proxy();
child._super = parent.prototype;
child.prototype.constructor = child;
}
}());