Originally by Jack Rometty
Forked from SitePoint's Pen Flat UI Buttons.
A Pen by Ojo Oluwasetemi on CodePen.
[ | |
{name: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
const loop = (() => { | |
const recur = (callback, count, i=0) => { | |
if (i == count-1) return callback(i); | |
callback(i); | |
return recur(callback, count, i+1); | |
}; | |
return (callback, count) => { | |
if (count > 0) return recur(callback, count); | |
}; | |
})(); |
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
"files.autoSave": "afterDelay", | |
"files.associations": { | |
"*.ejs": "html" | |
}, | |
"editor.wordWrap": "on", | |
"workbench.colorTheme": "monokai-best", | |
"workbench.iconTheme": "vscode-icons", | |
"vsicons.dontShowNewVersionMessage": true, | |
"window.zoomLevel": 0, | |
"cSpell.userWords": [ |
function truncateString(str, num) { | |
if (str.length <= num) { | |
console.log(str); | |
return str; | |
} else { | |
var newStr = []; | |
var nstr = str.split(""); | |
for (let index = 0; index < num; index++) { |
// code for my devtip on 12 June 2018: | |
// https://www.youtube.com/watch?v=0wiM3jW1DVY&list=PLV5CVI1eNcJgCrPH_e6d57KRUTiDZgs0u | |
const loadFile = file => { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(`contents of ${file}`) | |
}, 500) | |
}) | |
} | |
const files = ['01.md', '02.md', '03.md', '04.md', '05.md'] |
{ | |
allMarkdownRemark { | |
edges { | |
node { | |
excerpt(pruneLength: 280) | |
} | |
} | |
} | |
} |