As a developer
I want to get better at making my PRs easier to review
So that they get reviewed sooner and I can merge faster => shorter cycle times
As a code reviewer
I want PRs that are easier to review
So that it's less work
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
#include <stdio.h> | |
int main(int argvc, char * argv) | |
{ | |
printf("hello world\n"); | |
return 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
import qualified Data.Map as Map | |
import qualified Data.List as List | |
-- Getting started | |
-- download this file as e.g. hello.hs | |
-- brew install ghc | |
-- ghci | |
-- :r hello.hs | |
-- -- -- |
- get NixOS Virtualbox appliance from https://nixos.org/nixos/download.html#virtualbox-appliances
- start Virtualbox and "File -> Import Appliance" the downloaded OVA file
- go into Machine -> Settings, then Network / Adapter 1 / Advanced / ensure "Cable Connected" is checked
- start the machine, and wait for it to boot
- login at the graphical login screen, user: demo pw: demo
- when the desktop appears, go to "start" button (it is not labelled in any way) in bottom left, click to get menu
- open a shell with Applications -> System -> Terminal
sudo -i
nixos-generate-config --force
nano /etc/nixos/configuration.nix
and make the changes as shown in the diff (choose your own username)
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
Line 13: | |
. /etc/sysconfig/network | |
^-- SC1091: Not following: /etc/sysconfig/network was not specified as input (see shellcheck -x). | |
Line 15: | |
if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; then | |
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. | |
Line 34: |
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
;; Piezo is not a real bell | |
(ns piezo.core | |
(:require [clojure.core.async :as async :refer [chan >! >!! <! <!! go]])) | |
;; stubs to be filled in later | |
(defn http-listening-chan | |
"A channel which sends ring request maps on incoming HTTP requests | |
whose uri paths begin with `prefix`" |
Convert your ruby app to run on JRuby (often fairly painless) then deploy it by generating a JAR file (should be reasonably painless) and copying it to the servers you're running on (should be bordering on trivial).
If you've never done Java programming, a JAR is a "Java ARchive" file which is basically a single ZIP file containing all the stuff your app needs to run. So you can install java on a new machine and copy the JAR file onto it, and you're ready to go.
The usual way of deploying a Ruby app is to write (or copypasta) some Capistrano recipes to have the production machines check it out from a git repo then build it in exactly the same way you do on your Mac. This has downsides:
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
[global] | |
debug=true | |
#debug=false | |
# substitute your ec2 external ip for 52.x.y.x and your internal addr for 10.x.y.z | |
aliases=sip.52.19.37.223.xip.io | |
transports=sip:sip.52.19.37.223.xip.io;maddr=10.40.0.165 | |
[module::Registrar] | |
enabled=true | |
reg-domains=sip.52.19.37.223.xip.io |
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
building mongodb seems to hang forever in patchPhase. It has no prePatch hooks, no patches, and a postPatch | |
hook as follows | |
postPatch = '' | |
# fix environment variable reading | |
substituteInPlace SConstruct \ | |
--replace "env = Environment(" "env = Environment(ENV = os.environ," | |
''; | |
and it's that substituteInPlace call that takes forever |
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
dbarlow@macdbarlow-2 ~/src/geppetto (master=) $ vagrant box remove centipede | |
/Users/dbarlow/src/2geppetto/Vagrantfile:9: warning: already initialized constant CLOUDINIT_YML | |
/Users/dbarlow/src/geppetto/Vagrantfile:7: warning: previous definition of CLOUDINIT_YML was here | |
/Users/dbarlow/src/kitten/Vagrantfile:4: warning: already initialized constant REGION | |
/Users/dbarlow/src/chopin/Vagrantfile:4: warning: previous definition of REGION was here | |
/Users/dbarlow/src/kitten/Vagrantfile:5: warning: already initialized constant STAGE | |
/Users/dbarlow/src/chopin/Vagrantfile:5: warning: previous definition of STAGE was here | |
/Users/dbarlow/src/kitten/Vagrantfile:6: warning: already initialized constant APP | |
/Users/dbarlow/src/chopin/Vagrantfile:6: warning: previous definition of APP was here | |
/Users/dbarlow/src/kitten/Vagrantfile:7: warning: already initialized constant ROLE |
NewerOlder