Skip to content

Instantly share code, notes, and snippets.

View gist:914809455b98e3defb52
$ kong stop
[INFO] Using configuration: /etc/kong/kong.yml
[INFO] dnsmasq stopped
[OK] Stopped
View gist:f36713afefc79d5fa734
$ kong start
[INFO] Using configuration: /etc/kong/kong.yml
[INFO] Proxy port.........8000
Admin API port.....8001
dnsmasq port.......8053
Database...........cassandra keepalive=60000 hosts=kongdb.org port=35579 timeout=1000 keyspace=kong
[INFO] Connecting to the database...
[WARN] Setting "memory_cache_size" to default 128MB
[INFO] dnsmasq started
[OK] Started
View gist:7b498d84ae61a3b67624
Background
----------
This kata simulates a babysitter working and getting paid for one night. The rules are pretty straight forward:
The babysitter
- starts no earlier than 5:00PM
- leaves no later than 4:00AM
- gets paid $12/hour from start-time to bedtime
- gets paid $8/hour from bedtime to midnight
- gets paid $16/hour from midnight to end of job
@ddaugher
ddaugher / gist:11013038
Created Apr 17, 2014
code review exercise for PCA 2014
View gist:11013038
package com.somecompany.app.process;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import javax.imageio.ImageIO;
View gist:5581522
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
View Beanstalk
package com.urbanairship.octobot;
import com.surftools.BeanstalkClientImpl.ClientImpl;
import org.apache.log4j.Logger;
// This class handles all interfacing with a Beanstalk in Octobot.
// It is responsible for connection initialization and management.
public class Beanstalk {