Code should be submitted with a reasonable suite of tests, and code should be designed with testability in mind.
Commit messages should explain why code is changing, configuration is added,
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
5 error(s) occurred: | |
* plan operation: Real and shadow states do not match! Real state: | |
<no state> | |
module.child: | |
<no state> | |
Outputs: | |
received = 1GB |
Supply buildable source code that runs as a simple webserver.
The webserver is for storing clients' favorite foods. It should expose two API operations:
GET
on a route "/foods" to return a list of all your favorite foodsPOST
on the same route "/foods" to add a food to the listimport ( | |
"errors" | |
"log" | |
"net/http" | |
"time" | |
"flag" | |
"fmt" | |
) | |
var ( |
package kafka | |
import ( | |
"testing" | |
"time" | |
"github.com/samuel/go-zookeeper/zk" | |
) | |
func TestDiscoverKafka(t *testing.T) { |
#!/bin/bash | |
mkdir -p $HOME/.terminal-slack | |
( | |
cd $HOME/.terminal-slack | |
git clone https://github.com/evanyeung/terminal-slack > /dev/null | |
cat > terminal-slack.sh << EOF |
#!/usr/bin/python3 | |
if __name__ == '__main__': | |
print('hello world') |
import ( | |
"encoding/json" | |
"log" | |
"net" | |
"net/http" | |
"os" | |
"gopkg.in/mgo.v2" | |
"github.com/rs/cors" |
extern crate yaml_rust; | |
use std::fs::File; | |
use std::io; | |
use std::io::prelude::*; | |
use std::process; | |
// NOTE: why self here, again? | |
// because `use` defaults from crate root, and yaml is beneath | |
// crate root |