- ease of feature development
- avoid coupling with tests
- ease of test development
- avoid breakages
- make breakages easy to fix
| set -g default-terminal "screen-256color" | |
| # http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ | |
| # remap prefix from 'C-b' to 'C-a' | |
| unbind C-b | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix | |
| # split panes using | and - |
| [user] | |
| email = redacted@redacted | |
| name = Kevin Li | |
| [alias] | |
| df = diff --stat | |
| lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
| rec = !git for-each-ref --sort='-authordate:relative' --format='%(color:red)%(objectname:short) %(color:white)- %(color:yellow)(%(refname:short)) %(color:white)%(subject) %(color:green)(%(authordate:relative)) %(color:bold blue)<%(authorname)>' refs/heads | more -R | |
| sh = show --stat | |
| st = status -sb |
| var path = require('path'); | |
| //var HappyPack = require('happypack'); | |
| //var ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin; | |
| var LessAutoprefixer = require('less-plugin-autoprefix'); | |
| //var webpack = require('webpack'); | |
| module.exports = { | |
| entry: './front/src/js/app/app.ts', | |
| output: { |
| git for-each-ref --sort='-authordate:relative' --format='%(color:red)%(objectname:short) %(color:white)- %(color:yellow)(%(refname:short)) %(color:white)%(subject) %(color:green)(%(authordate:relative)) %(color:bold blue)<%(authorname)>' refs/heads | more -R` | |
| # Or in `.gitconfig / [alias]`, | |
| rec = !git for-each-ref --sort='-authordate:relative' --format='%(color:red)%(objectname:short) %(color:white)- %(color:yellow)(%(refname:short)) %(color:white)%(subject) %(color:green)(%(authordate:relative)) %(color:bold blue)<%(authorname)>' refs/heads | more -R |
| import Immutable = require('immutable'); | |
| import Monapt = require('monapt'); | |
| class Super { | |
| static prototypeHistory: Immutable.Map<any, Immutable.Stack<any>> = | |
| Immutable.Map<any, Immutable.Stack<any>>(); | |
| static get<T>(object: any, property: string): T { | |
| let value: T; |
| val lines: Array[String] = scala.io.Source.fromFile(args(0)).getLines().toArray | |
| val numberOfLinesToRead: Int = lines.head.toInt | |
| lines | |
| .tail | |
| .take(numberOfLinesToRead) | |
| .zipWithIndex | |
| .foreach{case (str: String, index: Int) => { | |
| val validCharacters: String = str | |
| .filter { Character.isLetter(_) } |
| def queens(n: Int): List[List[(Int, Int)]] = { | |
| def placeQueens(k: Int): List[List[(Int, Int)]] = | |
| if (k == 0) | |
| List(List()) | |
| else | |
| for { | |
| queens <- placeQueens(k - 1) | |
| column <- 1 to n | |
| queen = (k, column) | |
| if isSafe(queen, queens) |
| #!/usr/bin/env python | |
| def zeroFillStr(inputString, numOfZeros): | |
| # for clarity, used str concat instead of str formatting | |
| return re.sub( '\d+', | |
| lambda matchObj: | |
| ('%0' + str(numOfZeros) + 'i') % int(matchObj.group(0)), | |
| inputString ) |
| #!/usr/bin/env python | |
| print("type integers, each followed by Enter; or ^D or ^Z to finish") | |
| total = 0 | |
| count = 0 | |
| while True: | |
| try: | |
| line = input() | |
| if line: | |
| number = int(line) |