Skip to content

Instantly share code, notes, and snippets.

View funkytaco's full-sized avatar

Luis Gonzalez funkytaco

View GitHub Profile
- CPU: Intel Core i5-6500 3.2GHz Quad-Core Processor ($204.99)
- http://www.newegg.com/Product/Product.aspx?Item=9SIA24G3KG0114&cm_re=Intel_Core_i5-6500_3.2GHz_Quad-Core_Processor-_-19-117-563-_-Product
- Motherboard: Gigabyte GA-H110M-A Micro ATX LGA1151 Motherboard ( $49.99)
- http://www.newegg.com/Product/Product.aspx?Item=N82E16813128873
- Memory: Kingston HyperX Fury Black 8GB (2 x 4GB) DDR4-2133 Memory ($39.99 for 2)
- http://www.newegg.com/Product/Product.aspx?Item=N82E16820104532&cm_re=Kingston_HyperX_Fury_Black_8GB_%282_x_4GB%29_DDR4-2133_Memory-_-20-104-532-_-Product
- Storage: PNY CS1311 240GB 2.5" Solid State Drive ($59.99)
- http://www.newegg.com/Product/Product.aspx?Item=N82E16820178967&cm_re=PNY_CS1311_240GB_2.5%22_Solid_State_Drive-_-20-178-967-_-Product
<?php
//class stuff here ... yadda yadda yadda ....
public function getTicketById(Request $request, Response $response) {
//$send = $request->param('format', 'json');
//$response->send("/tickets by ID: Ticket ID: ". $request->id);
return "route matched!";
}
location /apps/hello {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://192.168.99.100:8080;
proxy_read_timeout 20;
return [
//Routes.
/** HTTP Method - URI - Array[Controller, controller method to call] **/
['GET', '/', [$IndexCtrl, 'get']],
['GET', '/about', [$IndexCtrl, 'getAbout']],
['GET', '/contact', [$IndexCtrl, 'getContact']]
];
@funkytaco
funkytaco / Docker.md
Created December 29, 2015 00:19 — forked from techniq/Docker.md
Docker links
#!/bin/bash
# Assumes a pre-built carina cluster, e.g.:
#
# carina create --wait shipyard \
# && carina credentials shipyard \
# && eval `carina env shipyard`
#
@funkytaco
funkytaco / shipyard-deploy.sh
Created November 3, 2015 06:33 — forked from alexproca/shipyard-deploy.sh
Custom shipyard deploy
#!/bin/bash
if [ "$1" != "" ] && [ "$1" = "-h" ]; then
echo "Shipyard Deploy uses the following environment variables:"
echo " ACTION: this is the action to use (deploy, upgrade, remove)"
echo " IMAGE: this overrides the default Shipyard image"
echo " PREFIX: prefix for container names"
echo " SHIPYARD_ARGS: these are passed to the Shipyard controller container as controller args"
echo " TLS_CERT_PATH: path to certs to enable TLS for Shipyard"
exit 1
@funkytaco
funkytaco / README.md
Created November 2, 2015 17:28 — forked from jpetazzo/README.md
Give network superpowers to docker

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

@funkytaco
funkytaco / add_nat_vbox.sh
Last active October 29, 2015 06:05
open all virtualbox ports for docker default host
#!/bin/bash
for i in {10000..10999}; do
VBoxManage modifyvm "default" --natpf1 "tcp-port$i,tcp,,$i,,$i";
VBoxManage modifyvm "default" --natpf1 "udp-port$i,udp,,$i,,$i";
done
@funkytaco
funkytaco / README.md
Created October 24, 2015 18:07 — forked from oscarrenalias/README.md
Docker service discovery with HAproxy, consul and registrator on Docker Machine and Docker Swarm