- http://vimgolf.com/challenges/50b1517e9aad890002000004 - ASCII generator (39)
- http://vimgolf.com/challenges/50b375efd028d90002000050 - Chess (51)
- http://vimgolf.com/challenges/5192f96ad8df110002000002 - Parenthesis (16, 14 with cheating...)
🧙♂️
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
{ | |
"storage": { | |
"packages": ".bower/cache", | |
"registry": ".bower/registry" | |
}, | |
"tmp": ".bower/tmp" | |
} |
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
/*! | |
* EventEmitter v4.2.7 - git.io/ee | |
* Oliver Caldwell | |
* MIT license | |
* @preserve | |
*/ | |
(function () { | |
'use strict'; |
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 e(m,i,t){return m.map(function(l){return l(i,m)})} |
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
var _ = require('lodash'); | |
function countType(type) { | |
return _.size(_.filter(Game.creeps, function (creep, creepName) { | |
return creepName.split('_')[0] === type; | |
})); | |
} | |
function build(spawn, type, attrNames) { | |
var attrs = attrNames.map(function (name) { |
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
var React = require('react'); | |
var _ = require('lodash'); | |
/** | |
* Compiles an array into a React DOM structure recursively. All segments of the node array are optional. | |
* | |
* The array segments can be in any order apart from the node type, that always needs to be first. | |
* | |
* Actually works really well, I'd quite like to open source this with CSS selector parsing in the nodeName. | |
* |
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
" Run expand on your current line or range of lines. | |
" Allows you to repeat {lines,blocks} like this {1..3} times. | |
" Allows you to repeat lines like this 1 times. | |
" Allows you to repeat lines like this 2 times. | |
" Allows you to repeat lines like this 3 times. | |
" Allows you to repeat blocks like this 1 times. | |
" Allows you to repeat blocks like this 2 times. | |
" Allows you to repeat blocks like this 3 times. |
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 SomeThing { | |
var sortOfPrivateThroughClosure = true; | |
this.someVal = {}; | |
this.doThing = function () { | |
// ... | |
}; | |
// Then sometimes the values are ES5 getter/setter methods with side effects. | |
// The only way to tell is to read the source of the object you're dealing with though. | |
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
#!/usr/bin/env bash | |
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
cat >>~/.vimrc <<EOL | |
set nocompatible | |
call plug#begin() | |
Plug 'tpope/vim-sensible' |
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
/** | |
* Turns a number (in number or string form) into a string with commas used as | |
* a thousands separator. | |
* | |
* Example: 10000000 -> 10,000,000 | |
* | |
* @param {String|Number} num | |
* @return {String} | |
*/ | |
function formatNumberWithCommas(num) { |
OlderNewer