- 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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" | |
| } |
First copy an existing language file, such as en.js from src/assets/js/trillek/i18n/. Rename and translate as you see fit.
Then open up src/assets/js/trillek/i18n/main.js and copy an existing config line, for example: .translations('en', require('./en')). Change the language code to point at your new file.
Now open up src/assets/js/trillek/config/default.js and add your new language code and translated label to the availableLanguages object. The full name should be written in the actual language it is for, so when it shows up in the selection list the user can actually find their language.