As an engineering team, code review is the single most important tool we have available to ensure the quality of the code we write and the safety of the systems we build. Automated testing is critical component too - but for a testsuite to be effective, it's necessary 1) that the code be "testable" - modular and well-structured, with clearly defined inputs, outputs and state transitions; and 2) that the tests accurately model the potential failure modes of the system - not
I hereby claim:
- I am olorin on github.
- I am fractalcat (https://keybase.io/fractalcat) on keybase.
- I have a public key whose fingerprint is 6FB7 ED25 BFCF 3E22 72AE 6E8C 47D4 CE7F 6B9F DF57
To claim this, I am signing this object:
I hereby claim:
- I am fractalcat on github.
- I am fractalcat (https://keybase.io/fractalcat) on keybase.
- I have a public key whose fingerprint is 6FB7 ED25 BFCF 3E22 72AE 6E8C 47D4 CE7F 6B9F DF57
To claim this, I am signing this object:
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
| // Hash a password with jBCrypt. | |
| public class Main { | |
| public static void main(String [] args) { | |
| String pw1 = args[0]; | |
| String h1 = BCrypt.hashpw(pw1, BCrypt.gensalt()); | |
| System.out.println(h1); | |
| } | |
| } |
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 python | |
| import sys, random, optparse | |
| def gen(generator, n, alphabet): | |
| password = [] | |
| stream = open(generator, 'rb') | |
| alphabet = set(map(lambda i: chr(i), alphabet)) | |
| while len(password) < n: | |
| c = stream.read(1) |
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
| Config { | |
| bgColor = "black" | |
| , fgColor = "grey" | |
| , position = TopW L 100 | |
| , font = "xft:Bitstream Vera Sans Mono:size=12:antialias=true" | |
| , commands = [ Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
| , Run Memory ["-t","Mem: <usedratio>%", "-H", "75", "--high", "red"] 10 | |
| , Run Swap [] 10 | |
| , Run Date "%a, %d %b | %H:%M:%S" "date" 10 | |
| , Run StdinReader |
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
| syntax on | |
| filetype indent plugin on | |
| au FileType python setlocal textwidth=0 wrapmargin=0 |
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
| (require 'color-theme) | |
| (eval-after-load "color-theme" | |
| '(progn | |
| (color-theme-initialize) | |
| (color-theme-solarized-dark))) | |
| (scroll-bar-mode -1) | |
| (menu-bar-mode -1) | |
| (tool-bar-mode -1) | |
| (set-face-attribute 'default nil :height 140) |
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/python2 | |
| import sys, random, optparse | |
| def gen(generator, n, alphabet): | |
| password = [] | |
| stream = open(generator, 'rb') | |
| alphabet = set(map(lambda i: chr(i), alphabet)) | |
| while len(password) < n: | |
| c = stream.read(1) |
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
| from django.forms import widgets | |
| from django.utils.encoding import force_unicode | |
| from django.utils.safestring import mark_safe | |
| class InlineRadioFieldRenderer(widgets.RadioFieldRenderer): | |
| def render(self): | |
| return mark_safe(u'\n%s\n' % u'\n'.join([u'%s' | |
| % force_unicode(w) for w in self])) | |
| class InlineRadioSelect(widgets.RadioSelect): |
NewerOlder