Using Laravel Valet for localhost development, So it installs
dnsmasqwith it. dnsmasq runs on port53, The default DNS port. So we setup dnscrypt-proxy on port5300with the default config files in this gist.
brew install dnscrypt-proxy
Using Laravel Valet for localhost development, So it installs
dnsmasqwith it. dnsmasq runs on port53, The default DNS port. So we setup dnscrypt-proxy on port5300with the default config files in this gist.
brew install dnscrypt-proxy
| """An atomic, thread-safe incrementing counter.""" | |
| import threading | |
| class AtomicCounter: | |
| """An atomic, thread-safe incrementing counter. | |
| >>> counter = AtomicCounter() | |
| >>> counter.increment() |
| #!/usr/bin/python2 | |
| import sys | |
| import numpy | |
| from scipy.io import wavfile | |
| from scipy.signal import fftconvolve | |
| def usage(): | |
| print >> sys.stderr, "Usage: wavgrep.py --like|--similar|--this needle.wav haystack.wav" |
| import os | |
| import random | |
| import string | |
| from fabric.api import env, local, require, lcd | |
| from fabric.colors import cyan | |
| from fabric.operations import prompt | |
| current_dir = os.getcwd() | |
| env.project_name = '{{cookiecutter.app_name}}' |
The *.txt files here hold user and database parameters. Specifically, replication.txt contains the user/role and password to use for replication. Whereas database.txt contains an initial database, user/role and password to create on the master.
Run the master:
$ fig run -d master
Wait for it to start up completely. Start the slave:
| /* Useful celery config. | |
| app = Celery('tasks', | |
| broker='redis://localhost:6379', | |
| backend='redis://localhost:6379') | |
| app.conf.update( | |
| CELERY_TASK_RESULT_EXPIRES=3600, | |
| CELERY_QUEUES=( | |
| Queue('default', routing_key='tasks.#'), |
passwd
apt-get update
apt-get upgrade
apt-get install fail2ban
useradd deploy
mkdir /home/deploy