Mirror local repo to reflect remote
git fetch origin
git reset --hard origin/master
Delete remote branch
function getStyle(el, styleProp) { | |
var value, defaultView = el.ownerDocument.defaultView; | |
// W3C standard way: | |
if (defaultView && defaultView.getComputedStyle) { | |
// sanitize property name to css notation (hypen separated words eg. font-Size) | |
styleProp = styleProp.replace(/([A-Z])/g, "-$1").toLowerCase(); | |
return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); | |
} else if (el.currentStyle) { // IE | |
// sanitize property name to camelCase | |
styleProp = styleProp.replace(/\-(\w)/g, function(str, letter) { |
function grid() { | |
var k, d, e, g, j, a, m, h, l, c, o, n, b, f; | |
c = { | |
columns: { | |
"default": { | |
columns: 12 | |
} | |
}, | |
gapWidth: 20, |
function clone(origin, filter) { | |
'use strict'; | |
var obj, p; | |
function isTypeOf(obj) { | |
if (obj === undefined) { return undefined; } | |
var obType = String(obj.constructor).match(/function\s+(\w+)/); | |
return obType ? obType[1] : 'undefined'; | |
//return obType ? (obType[1] === type) : false; | |
} |
function parseFloats(str) { | |
/*jslint regexp:true*/ | |
str = (str || '').replace(/[\x80-\xFF]|&.{0,}?;/g, '') || ''; | |
var m = str.match(/[0-9]{1,}(\.|,)?([0-9]{1,})?(\.|,)?([0-9]{1,})?/g) || []; | |
m = m.map(function (item) { | |
item = item.match(/(\d+)((,|\.)(?!.*(,|\.)[0-9]))?/g).join('').replace(/\.|,/, '.'); | |
return parseFloat(item, 10); | |
}); |
<!doctype html> | |
<title>Document</title> | |
<meta charset='utf-8'> | |
<style> | |
body { | |
min-height: 1800px; | |
background: #EFEFEF; | |
} | |
.container { | |
position: relative; |
### Keybase proof | |
I hereby claim: | |
* I am zanona on github. | |
* I am zanona (https://keybase.io/zanona) on keybase. | |
* I have a public key whose fingerprint is B7F8 DA33 FCA5 FB13 C31F 120B B8BB 359D BF0A 62FC | |
To claim this, I am signing this object: |
/*jslint node:true, stupid:true*/ | |
module.exports = function (src) { | |
'use strict'; | |
src = require('path').resolve(src); | |
var tapi = require('sway'), | |
YAML = require('yaml-js'), | |
fs = require('fs'), | |
file = fs.readFileSync(src).toString(); | |
function positionRangeForPath(yaml, path, cb) { |
var elements = document.querySelectorAll("div"), | |
callback = (el) => { console.log(el); }; | |
// Spread operator | |
[...elements].forEach(callback); | |
// Array.from() | |
Array.from(elements).forEach(callback); | |
// for...of statement |