Skip to content

Instantly share code, notes, and snippets.

View zyegfryed's full-sized avatar

Sébastien Fievet zyegfryed

View GitHub Profile
@zyegfryed
zyegfryed / cloudinit.yml
Last active July 30, 2021 09:16
API error when provisioning VMs with cloud-init
#cloud-config
apt:
sources:
sury.list:
source: "deb https://packages.sury.org/php $RELEASE main"
key: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBFyPb58BDADTDlJLrGJktWDaUT0tFohjFxy/lL2GcVYp4zB981MWIDC0aIQZ
@zyegfryed
zyegfryed / .aliases
Created January 15, 2021 09:23
cljfmt
#
# Usage: cljfmt [check|fix] <FILE_OR_PATH>
#
alias cljfmt="clojure -Sdeps '{:deps {cljfmt/cljfmt {:mvn/version \"0.7.0\"}}}' -m cljfmt.main"
@zyegfryed
zyegfryed / .aliases
Last active January 15, 2021 09:33
kargo alias
#
# Usage: kargo manifests kargo.edn
#
# Note: MUST be a function and NOT an alias because `pwd` MUST be interpreted each time the command runs.
# When using an alias, `pwd` will resolve to $HOME instead!
#
function kargo() {
docker run --rm -v `pwd`:`pwd` -w `pwd` \
-e ENVIRONMENT=${ENVIRONMENT:=preprod} \
-e ZONE=${ZONE:=ch-gva2-1} \
@zyegfryed
zyegfryed / postmortem.md
Created June 19, 2020 15:35 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym

Keybase proof

I hereby claim:

  • I am zyegfryed on github.
  • I am zyegfryed (https://keybase.io/zyegfryed) on keybase.
  • I have a public key whose fingerprint is CB7D F78F 241E EC07 3006 43B3 1CA6 8A36 B419 64A5

To claim this, I am signing this object:

@zyegfryed
zyegfryed / graphite-api.conf.py
Last active August 29, 2015 13:57
Graphite API init script
bind = "0.0.0.0:2005"
workers = 4
user = "carbon"
group = "carbon"
@zyegfryed
zyegfryed / initd_tuqtng
Created November 28, 2013 14:56
Couchbase Query Engine (tuqtng) init script
#!/bin/bash
#
# /etc/rc.d/init.d/tuqtng
#
# Start up the Couchbase Query Language service daemon
#
# chkconfig: 2345 20 80
#
# processname: tuqtng
# config: /etc/sysconfig/tuqtng
@zyegfryed
zyegfryed / install.sh
Created August 24, 2012 09:24
pystatsd installation script
apt-get install python-pip
pip install pystatsd
cat > /etc/default/statsd <<EOF
STATSD_PORT=8125 # port to run on (default: 8125)
PCT=90 # stats pct threshold (default: 90)
GRAPHITE_HOST=localhost # host to connect to graphite on (default: localhost)
GRAPHITE_PORT=2003 # port to connect to graphite on (default: 2003)
USER=nobody # user to run statsd as
@zyegfryed
zyegfryed / .env
Created August 18, 2012 15:56
Procfile and environment file that plays nice with Python and foreman
PORT=8000
VENV_HOME=/usr/local/venv/develop
PYTHONUNBUFFERED=true
@zyegfryed
zyegfryed / indexes.py
Created August 18, 2012 12:59
Configurable SearchIndex for Haystack
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
# Python 2.7 has an importlib with import_module; for older Pythons,
# Django's bundled copy provides it.
try: # pragma: no cover
from importlib import import_module # pragma: no cover
except ImportError: # pragma: no cover
from django.utils.importlib import import_module # pragma: no cover