- Add the ansible package repository
sudo apt-add-repository ppa:ansible/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
| http { | |
| #... | |
| server { | |
| #... | |
| location /private/ { | |
| auth_request /auth; | |
| auth_request_set $auth_status $upstream_status; | |
| } | |
| location = /auth { |
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
| class RouterGuts(object): | |
| def __init__(self, **kwargs): | |
| self.name = kwargs.get('name') | |
| self.route = kwargs.get('route') | |
| def Handler(**kwargs): | |
| def decorateHandlerClass(cls): | |
| guts = RouterGuts(**kwargs) | |
| setattr(cls,'_guts', guts) |
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
| Heap and Swap sizing: | |
| https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html |
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
| 2018-06-24 09:34:16 main INFO { "event": "wing", "data": "wong" } | |
| 2018-06-24 09:34:16 main DEBUG { "event": "ping", "data": "pong" } | |
| 2018-06-24 09:34:16 main WARNING { "event": "ding", "data": "dong" } | |
| 2018-06-24 09:34:16 main CRITICAL { "event": "ping", "data": "pong" } | |
| 2018-06-24 09:34:21 main INFO { "event": "wing", "data": "wong" } | |
| 2018-06-24 09:34:21 main DEBUG { "event": "ping", "data": "pong" } | |
| 2018-06-24 09:34:21 main WARNING { "event": "ding", "data": "dong" } | |
| 2018-06-24 09:34:21 main CRITICAL { "event": "ping", "data": "pong" } | |
| 2018-06-24 09:34:26 main INFO { "event": "wing", "data": "wong" } | |
| 2018-06-24 09:34:26 main DEBUG { "event": "ping", "data": "pong" } |
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
| # /etc/nginx/sites-available/default | |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server; | |
| index index.html index.htm index.nginx-debian.html; | |
| server_name _; | |
| location / { |
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
| const Gauge = require('gauge'); | |
| const themes = require('./node_modules/gauge/themes'); | |
| const $ = require('chalk'); | |
| let x = themes.themes.colorBrailleSpinner; | |
| x.preSubsection = $.bold.blue('|'); | |
| x.preProgressbar = ''; | |
| x.postProgressbar = ''; | |
| //console.log(x) | |
| let g = new Gauge(null, { theme: x }) |
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
| #!/bin/bash | |
| sfood pocha/ -i -r | sfood-graph -p | circo -Tsvg > this.svg |
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
| ## | |
| # Example of using pocha, this might be good? | |
| from pocha import describe, it | |
| @describe('A feature') | |
| def test_case(): | |
| @it('Should behave as expected when doing A') | |
| def _(): |
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
| var english_words = require('an-array-of-english-words'); | |
| function lookup(word) { | |
| return english_words | |
| .filter(x => { return x.startsWith(word); }) | |
| .sort((a, b) => { return 0.5 - Math.random(); }); | |
| } | |
| function suggest(word, count, cb, constants) { |