This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { var i = 0; function nextImg() { var imgs = document.querySelectorAll('img'), el; while (i < imgs.length) { el = imgs[i]; i++; if (el.getBoundingClientRect().top > 0) { return el.scrollIntoView(); } } i = 0; } document.addEventListener('keypress', function(e) { var key = String.fromCharCode(e.keyCode || e.which); if (key == 'j') nextImg(); }); nextImg(); })(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alignment = left center right justify start end | |
text() | |
sized = false | |
for arg in arguments | |
if arg is a 'color' | |
color arg | |
else if arg is a 'unit' | |
if sized | |
line-height arg | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function updateArray (arr, newArr) { | |
if (!arr.index) | |
arr.index = arr.reduce(function(seed, item) { | |
seed[item.id] = item | |
return seed | |
}, {}) | |
newArr.forEach(function(item) { | |
if (arr.index[item.id]) | |
return _.assign(arr.index[item.id], item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"dev": "webpack-dev-server --inline --hot" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dot path; dot({ prop: { inner: 1 } }, 'prop.inner') == 1 | |
function dot (o, path) { | |
if (!path) | |
return o | |
var p = path.split('.') | |
while (p.length > 0) { | |
o = o[p.shift()] | |
if (o == undefined) | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[].map.call(document.querySelectorAll('img'), function(el) { el.click() }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
route { | |
display: block; | |
background: yellow; | |
} | |
route[path] { | |
display: none; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function first () { | |
console.log(1) | |
} | |
function second () { | |
console.log(2) | |
} | |
function three (val) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('connecting ftp...') | |
var FTP = require('jsftp'), | |
async = require('async') | |
var ftp = new FTP({ | |
host: '', | |
port: 21, | |
user: '', | |
pass: '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"start": "node ./server/www", | |
"test": "faucet", | |
"front": "npm run bs & npm run stylus", | |
"back": "npm run nodemon & npm run stylus", | |
"build": "npm run stylus-build", | |
"deploy": "npm run build && node tasks deploy", | |
"bs": "browser-sync start --server --no-online --startPath=\"pub/index.html\" --files=\"pub/*.html, pub/css/*.css\"", | |
"stylus": "stylus -w -u nib -u jeet -u autoprefixer-stylus --sourcemap-inline pub/css/*.styl", |
OlderNewer