-
https://sloppy.io/ commercial, docker, mesos
-
https://arukas.io/ docker hosting, currently free
-
https://deis.com/workflow/ kubernetes, multi target, supports Heroku buildpack Looks like many commands, so far it is quite unclear to me. Comes with monitoring, influxdb, grafana, telegraf! Lots of stuff, looks nice but it's a proper prebuilt solution so could be a steep learning curve Has an nginx reverse router
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
``` | |
[03:18] <ScaWilliam> I have a file that contains multiple lines of curl arguments, eg one line -X POST, one line -H 'Content-Type: application/json' one line -d '{"some": "payload"}' --- I tried doing curl "$(cat file.txt)" http://host/ but it won't work - it doesn't evaluate the arguments properly. How do I do what I want? | |
[03:20] <greycat> ScaWilliam: mapfile -t curlargs < myfile; curl "${curlargs[@]}" "$url" | |
[03:30] <ScaWilliam> @greycat your command worked with one line -X, another POST, another -H another Content-Type: ... | |
[03:31] <greycat> But...? | |
[03:31] * greycat waits for "I actually have multiple options per line and they're shell-quoted" | |
[03:31] <ScaWilliam> hah no, figured out that one myself. | |
[03:31] <ScaWilliam> thanks, I'll share your website on twitter, this was very helpful :-) | |
The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.
- Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
- Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
- Once documentation has been written, development should commence, and test-driven development is preferred.
- Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
- When a feature is being modified, it should be modified documentation-first.
- When documentation is modified, so should be the tests.
- http://www.conviva.com/canary-deployment-with-nginx/
- http://docs.ansible.com/ansible/guide_rolling_upgrade.html
- https://github.com/leucos/ansible-blue-green/blob/master/tasks/blue-green.yml
- https://tenzer.dk/nginx-with-dynamic-upstreams/
- http://nginx.org/en/docs/http/ngx_http_upstream_module.html
- http://docs.ansible.com/ansible/lineinfile_module.html
- http://nginx.org/en/linux_packages.html
- https://github.com/jdauphant/ansible-role-nginx
- https://github.com/debops/ansible-nginx
- https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/
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
- name: zulu apt key | |
apt_key: keyserver='hkp://keyserver.ubuntu.com:80' id=0x219BD9C9 | |
- name: Add Zulu repository | |
apt_repository: | |
repo: deb http://repos.azulsystems.com/debian stable main | |
state: present | |
- name: ensure zulu jdk installed | |
apt: |
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
java.nio.file.Files.lines( | |
java.nio.file.Paths.get("/dev/stdin") | |
).map(function (line) { | |
var time = line.substring(0, line.indexOf(" ")) | |
var payload = line.substring(line.indexOf(" ") + 1); | |
var instant = java.time.LocalDateTime.parse(time).atZone(java.time.ZoneId.of("Europe/Paris")).toInstant() | |
var newTimeStr = java.time.format.DateTimeFormatter.ISO_INSTANT.format(instant); | |
return [newTimeStr, "aura.woop.ac:10000", payload].join("\t"); | |
}) | |
.forEach(print); |
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
cut -c 1-10,20- | \ | |
cut -f 1,2 -d $'\t' | \ | |
mawk -F $'\t' -v OFS=$'\t' '$1 == last_date { counts[$2]++; } $1 != last_date { for ( i in counts ) print last_date, counts[i], i; last_date = $1; delete counts; }; END {for ( i in counts ) print last_date, counts[i], i;}' |
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
#curl -s 'https://actionfps.com/logs.tsv?from=2017-01-01T00:00:00Z&to=2099-04-10T11:02:03Z' > AFPS2017.txt | |
#python fraudeur.py < AFPS2017.txt > fraudeur.csv | |
import sys | |
fragCLA={"AssaultCube[local#1999]": 0, "AssaultCube[local#2999]": 0, "AssaultCube[local#3999]":0, "AssaultCube[local#4999]":0, "AssaultCube[califapublic]": 0, "ActionFPS[local#7654]": 0, "ac_server[32337]": 0} | |
flagCLA={"AssaultCube[local#1999]": 0, "AssaultCube[local#2999]": 0, "AssaultCube[local#3999]":0, "AssaultCube[local#4999]":0, "AssaultCube[califapublic]": 0, "ActionFPS[local#7654]": 0, "ac_server[32337]": 0} | |
fragRVSF={"AssaultCube[local#1999]": 0, "AssaultCube[local#2999]": 0, "AssaultCube[local#3999]":0, "AssaultCube[local#4999]":0, "AssaultCube[califapublic]": 0, "ActionFPS[local#7654]": 0, "ac_server[32337]": 0} | |
flagRVSF={"AssaultCube[local#1999]": 0, "AssaultCube[local#2999]": 0, "AssaultCube[local#3999]":0, "AssaultCube[local#4999]":0, "AssaultCube[califapublic]": 0, "ActionFPS[local#7654]": 0, "ac_server[32337]": 0} | |
time={"Assau |
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
$ brew install kubectl | |
$ minikube start | |
$ minikube dashboard | |
Set up a service (e.g. scalawilliam/eventsource-hub) | |
$ kubectl cluster-info | |
Get an IP | |
$ kubectl describe service | |
Get NodePort | |
$ curl http://<NodePort>:<IP> |
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
$ jjs -cp $(coursier fetch org.jsoup:jsoup:1.10.1) | |
var document = org.jsoup.Jsoup.connect("http://www.bbc.com/news").get() | |
document.select(".title-link__title-text").stream().map(function(item) { return item.text(); }).forEach(print); | |
document = org.jsoup.Jsoup.connect("http://www.bbc.com/news").get() | |
document.select(".title-link__title-text").forEach(function(item) { print(item.text()); }) | |
document.select(".title-link__title-text").stream().map(function(item) { return item.text(); }).forEach(print); | |
document.select(".title-link__title-text").stream().map(lambda x: x.text()).forEach(lambda x: print(x)) | |