View quorum.rb
1 2 3 4 5 6 7 8 9 10
require 'pp'
require 'typhoeus'
 
ENV['QUORUM'] ||= '3'
ENV['CONCURRENCY'] ||= '2'
ENV['TIMEOUT'] ||= '0.001'
ENV['VERBOSE'] ||= '0'
 
urls = {
'www.example.com/1' => {},
View gist:e3a666e58b71c14f35a7
1 2 3 4 5 6 7 8 9 10
docker is easily broken, e.g. its process management becomes easily out of sync.
I.e create container, kill process 1, then exit.
 
CID=$(docker run -it -d ubuntu:latest bash);
docker exec -i -t $CID kill 1;
docker ps
docker rm -f $CID;
 
Error response from daemon: Could not kill running container, cannot remove - no such process
FATA[0000] Error: failed to remove one or more containers
View gist:1d5aa5486ac19d96eec1
1 2 3 4 5 6 7 8 9 10
 
root@services-api2:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.8G 7.4G 0 100% /
udev 1.9G 12K 1.9G 1% /dev
tmpfs 375M 288K 375M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 0 1.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/xvdb 15G 39M 15G 1% /mnt
View gist:23771d5e60f297e1e799
1 2 3 4 5 6 7 8 9 10
SELECT
COUNT(1) as number_of_orders,
WEEK(o.created) AS week_no,
get_meta_value('_HASH_brand_id', c.meta) AS brand_id,
rc.value,
SUM(o.total_gross) AS total_gross,
SUM(o.total_net) AS total_net
FROM orders o
JOIN channels c ON (o.channel_id = c.id)
JOIN reference_codes rc ON (rc.id = get_meta_value('_HASH_brand_id',c.meta))
View dns.md

DNS

IMPORTANT! - The naming conventions are important to the creating DNS records. The DNS records are to be largely scripted.

Naming

Instance IDs

Amazon instance ids are in the form "i-2227656c".

View gist:01b12211896bd67f1996
1 2 3 4 5 6 7 8 9 10
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"vpcdabe22b2": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.107.0.0/16",
"InstanceTenancy": "default",
"EnableDnsSupport": "true",
"EnableDnsHostnames": "true",
View gist:b2f98bc5b94cc9969c2a
1 2 3 4 5 6 7 8 9 10
Hi Andy C,
 
Thanks for the response. The root disk is not 100% full, however I believe I know why the opsworks agent fails to run.
 
The servers in question that these are failing on are development instances.
We have custom monit scripts to respawn our own processes not just the opsworks agent.
 
The development team stop monit when doing development work on these instances. And therefore the thing that spawns the opsworks agent is monit.
 
As can be seen from the following...
View group_by_date
1 2 3 4 5 6 7 8 9
SELECT
x.total_orders_valid_uc,
x.total_orders_valid,
(x.total_orders_valid_uc / x.total_orders_valid) * 100 AS total_orders_valid_pct,
 
 
x.total_orders_invalid_uc,
x.total_orders_invalid,
(x.total_orders_invalid_uc / x.total_orders_invalid) * 100 AS total_orders_invalid_pct,
View gist:a383cbcf77ff63599f40
1 2 3 4 5 6 7 8 9 10
 
# Group Stores
Notes related resources of the **Stores API**
 
## Store [/store/{id}]
 
+ Parameters
+ id (integer, `1`) ... The id of the Store.
 
+ Model (application/json)
View gist:6adb310405c550189a1f
1 2 3 4 5 6 7 8 9 10
FORMAT: 1A
HOST: http://api-co.photobox.com/v2/
 
# Universal Checkout & Payments API
 
The checkout and payments API will masqaurades calls to underlying payment gateways allowing multiple payment gateways.
It will implement both native API calls and redirection to hpp implementations.<br><br>
 
The checkout/payments implementation will be self contained to allow the application
to adhere to PCI compliance and limit the scope of compliance. <br>
Something went wrong with that request. Please try again.