Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
# Configuration file for runtime kernel parameters. | |
# See sysctl.conf(5) for more information. | |
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
# an explanation about some of these parameters, and instructions for | |
# a few other tweaks outside this file. | |
# Protection from SYN flood attack. | |
net.ipv4.tcp_syncookies = 1 |
package main | |
import ( | |
"log" | |
"encoding/json" | |
"fmt" | |
"os" | |
"math/rand" |
/* | |
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command: | |
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123 | |
which opens a tunnel between the two endpoints and permit to exchange information on this direction: | |
server:8080 -----> client:8080 |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
''' | |
A python script which starts celery worker and auto reload it when any code change happens. | |
I did this because Celery worker's "--autoreload" option seems not working for a lot of people. | |
''' | |
import time | |
from watchdog.observers import Observer ##pip install watchdog | |
from watchdog.events import PatternMatchingEventHandler | |
import psutil ##pip install psutil | |
import os |
{ | |
"presets": ["es2015"], | |
"plugins": ["transform-async-to-generator"] | |
} |
// Package main implements a simple ssh client, roughly similar to the | |
// standard OpenSSH client. It uses golang.org/x/crypto/ssh and integrates | |
// with the ssh agent. | |
// | |
// Mostly, this demonstrates correct resource management and cleanup, as well | |
// as command dispatch. Obviously, this has never been vetted for security, so | |
// please don't use for anything serious. | |
package main | |
import ( |
{ | |
"AF": "Afghanistan", | |
"AX": "Aland Islands", | |
"AL": "Albania", | |
"DZ": "Algeria", | |
"AS": "American Samoa", | |
"AD": "Andorra", | |
"AO": "Angola", | |
"AI": "Anguilla", | |
"AQ": "Antarctica", |