Skip to content

Instantly share code, notes, and snippets.

master:
image: rancher/server
container_name: master
volumes_from:
- mysql
ports:
- "8080:8080"
links:
- mysql
environment:
@sax1johno
sax1johno / SearchAndSort_main.cpp
Created April 27, 2017 00:16
Binary Search, Linear Search, and Bubble Sort implementations from 04/26/2017
#include <vector>
#include <iostream>
int linearSearch(std::vector<int> &vectorToSearch, int itemToTest);
void bubbleSort(std::vector<int> &vectorToSort);
int binarySearch(std::vector<int> &vectorToSearch, int numToTest);
int main() {
std::vector<int> myVector;
myVector.push_back(5);
## RESTHeart Configuration File.
---
#### Listeners
# Listeners allow to specify the protocol, ip, port and to use.
# The supported protocols are: http, https and ajp. You can setup a listener per protocol (up to 3).
# WARNING: RESTHeart uses basic authentication; usernames and passwords are sent over the net on each request.
# Using the http listener is not secure: users credentials can be sniffed by a man-in-the-middle attack.
# Use the http listener only on trusted environments.
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
## RESTHeart Configuration File.
---
#### Listeners
# Listeners allow to specify the protocol, ip, port and to use.
# The supported protocols are: http, https and ajp. You can setup a listener per protocol (up to 3).
# WARNING: RESTHeart uses basic authentication; usernames and passwords are sent over the net on each request.
# Using the http listener is not secure: users credentials can be sniffed by a man-in-the-middle attack.
# Use the http listener only on trusted environments.
@sax1johno
sax1johno / Contract Killer 3.md
Created November 1, 2016 20:55 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

// LINE 160 of seneca-transport/lib/tcp.js
reconnect.on('disconnect', function (err) {
seneca.log.debug('client', type, 'disconnect', spec, topic, clientOptions,
(err && err.stack) || err)
_.find(connections, { clientOptions: clientOptions }).setup = false // This code fails. Wrapping an "undefined" guard around _.find fixes the issue.
})
seneca.ready(function() {
client = seneca.client({type: 'tcp'});
})
@sax1johno
sax1johno / index.css
Created September 20, 2016 00:10
Baseball Example created by sax1johno - https://repl.it/DdNO/3
Empty file
I just worked out another flow to have Zero downtime (mainly for web apps).
Proxy
We use jwilder/nginx-proxy to handle routing to app servers, this will assist us in dynamically routing requests to services.
First Deploy
For the first deploy run docker-compose --project-name=app-0001 up -d.