- Architecture Astrautics
- Inventing rather than extracting - Don't invent a libray, extract it out.
- Consistency
- Think like a wise man, speak in the language of common men
- Don't be syntactically clever.
- Warning Signs
- Frequent references to your own docs and source
Make sure these boxes are checked before submitting/approving the PR
- The code works
- The code is easy to understand
- Follows coding conventions
- Names are simple and if possible short
- Names are spelt correctly
- Names contain units where applicable
- There are no usages of magic numbers
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
''' | |
This is a minimal python chat client which connects to the `rooms:lobby` topic. | |
The server is supposed to be | |
http://www.phoenixframework.org/docs/channels#section-tying-it-all-together | |
''' | |
from __future__ import print_function | |
try: # py2 | |
get_user_input = raw_input |
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
{ | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"function_score": { | |
"query": { | |
"bool": { | |
"must": [ | |
{ |
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
export default class App extends Component { | |
constructor(props) { | |
super(props); | |
this.toggleVisibility = this.toggleVisibility.bind(this); | |
this.state = { | |
isSecretVisible: false | |
}; | |
} | |
toggleVisibility() { |
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
export default class App extends Component { | |
constructor(props) { | |
super(props); | |
this.toggleVisibility = this.toggleVisibility.bind(this); | |
this.state = { | |
isSecretVisible: false | |
}; | |
} | |
toggleVisibility() { |
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
PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |