- I am the class being tested. Thou shalt not test any other class but me.
- You shall not make for yourself a mock of an API that you don't own.
- You shall not call a system or integration test a unit test.
- Your unit test suite shall not take all week to run.
- [father and mother]
- Thou shall not kill the runtime environment.
- [adultery]
- [steal]
- You shall not bear false witness against your neighboring tests.
- You shall not covet your system's files, you shall not covet your system's threads, or his sockets, or his graphics environment, or his environment variables, or anything that is part of your system.
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
server { | |
server_name www.example.com; | |
rewrite ^ http://example.com$request_uri? permanent; | |
} | |
upstream php-example-com-backend { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
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
/etc/apt/sources.list.d/squeeze-backports.list: | |
file.managed: | |
- source: salt://backports/etc/apt/sources.list.d/squeeze-backports.list | |
- mode: 0644 | |
/etc/apt/sources.list.d/salt-uppercase-backports.list: | |
file.managed: | |
- source: salt://backports/etc/apt/sources.list.d/salt-uppercase-backports.list | |
- mode: 0644 | |
cmd.run: |
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
## /etc/unicorn/blahblah.conf | |
RACK_ROOT="/srv/www/blahblah.muda.no" | |
IS_RAILS="True" | |
UNICORN_BIN="bundle exec bin/unicorn_rails" | |
UNICORN_PORT="None" # <=========== WRONG!! WTF?! | |
# Export RACK_ENV. | |
export RACK_ENV="custom" |
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
upstream blah-muda-no-backend { | |
server unix:/var/run/unicorn/blah-muda-no.sock fail_timeout=0; | |
} | |
server { | |
server_name blah.muda.no; | |
client_max_body_size 10m; | |
root /srv/www/blah.muda.no/public; | |
access_log /var/log/nginx/blah.muda.no.access.log; |
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
#/etc/salt/master | |
interface: 0.0.0.0 | |
worker_threads: 2 | |
file_roots: | |
base: | |
- /srv/salt/states | |
pillar_roots: |
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
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/lib') | |
require 'rubygems' | |
require 'bundler' | |
Bundler.setup | |
require 'thor' | |
require 'cucumber/rake/task' | |
require 'rspec/core/rake_task' | |
require 'label_generator/version' | |
require 'net/http' | |
require 'net/ssh' |
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
Dec 8 13:45:39 vagrant-host puppet-agent[1838]: (/Stage[main]/Blah::Deployers/Ssh_authorized_key[oc@deploy]/ensure) created | |
-- | |
Dec 8 13:45:39 vagrant-host puppet-agent[1838]: (/Stage[main]/Blah::Deployers/Ssh_authorized_key[oc@deploy]) Could not evaluate: Puppet::Util::FileType::FileTypeFlat could not write /home/admin/.ssh/authorized_keys: Permission denied - /home/admin/.ssh/authorized_keys | |
-- | |
WTF? Why does it try to write /home/admin/.ssh/authorized_keys for deploy user? | |
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 | |
from flask import Flask, request | |
import re | |
import os | |
import math | |
app = Flask(__name__) | |
def is_prime(n): | |
import math |
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
These are the current status codes in the tracking APIs as of 2011-09-29. | |
Please note: There might be more later as we are integrating several tracking systems, | |
so you should handle other than these in your code. For instance by warning or similar. | |
TERMINAL (TERMINAL) | |
CUSTOMS (TOLL) | |
DELIVERED (UTLEVERT) | |
ATTEMPTED_DELIVERY (FORSØKT_UTLEVERT) | |
DEVIATION (AVVIK) |