cat /proc/sys/net/bridge/bridge-nf-call-iptablessysctl vm.swappiness=0
swapoff -a| #!/usr/bin/env bash | |
| # | |
| # Watch specified directory recursively for file changes, and sync it to S3 when anything is | |
| # created, modified, moved or deleted. Designed for use with a static site generator. | |
| # | |
| # Originally based on a script by Senko Rasic <[email protected]> | |
| # Modified by Tim Malone <[email protected]> | |
| # Ideas included from Lambros Petrou <[email protected]> | |
| # Released to public domain. | |
| # See https://gist.github.com/senko/1154509 |
| File | Purpose |
|---|---|
/etc/compose/docker-compose.yml |
Compose file describing what to deploy |
/etc/systemd/system/docker-compose-reload.service |
Executing unit to trigger reload on docker-compose.service |
/etc/systemd/system/docker-compose-reload.timer |
Timer unit to plan the reloads |
/etc/systemd/system/docker-compose.service |
Service unit to start and manage docker compose |
Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service| # Adapted from solution provided by http://stackoverflow.com/users/57719/chin-huang http://stackoverflow.com/a/31465939/348868 | |
| # Scenario: You want to add a group to the list of the AllowGroups in ssh_config | |
| # before: | |
| # AllowGroups Group1 | |
| # After: | |
| # AllowGroups Group1 Group2 | |
| - name: Add Group to AllowGroups | |
| replace: | |
| backup: yes |
| ssh-agent bash -c 'ssh-add -D && ssh-add <path/to/your/ssh/key/file> && git clone [email protected]:<username>/<repo>.git' |
| /* | |
| After purchasing a humble book bundle, go to your download page for that bundle. | |
| Open a console window for the page and paste in the below javascript. | |
| This will download all the books in all the formats available. | |
| */ | |
| $('a').each(function(i){ | |
| if (['MOBI', 'PDF', 'EPUB'].indexOf($.trim($(this).text())) >= 0) { | |
| $('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">'); | |
| document.getElementById('dl_iframe_'+i).src = $(this).data('web'); | |
| } |
| import time | |
| import socket | |
| import optparse | |
| import sys | |
| import textwrap | |
| import paramiko | |
| from sftpserver.stub_sftp import StubServer, StubSFTPServer |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of