Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# Adam Sharp
# Aug 21, 2013
#
# Usage: Add it to your PATH and `git remove-submodule path/to/submodule`.
#
# Does the inverse of `git submodule add`:
# 1) `deinit` the submodule
# 2) Remove the submodule from the index and working directory
FROM alpine:3.3
RUN apk update && \
apk add \
ca-certificates \
git \
ruby \
ruby-dev \
build-base \
perl \
resolver 127.0.0.1;
set $upstream "upstream.example.com";
proxy_pass $scheme://$upstream;
# Will be work only after Nginx 1.7.6 version
limit_req_zone "$binary_remote_addr$request_uri" zone=limited:10m rate=5r/s
@odinsy
odinsy / README.md
Created February 22, 2019 13:03 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service

[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
@odinsy
odinsy / 00-cookie-map.conf
Last active January 23, 2019 14:49
Nginx configuration for proxying internal proxied services
@odinsy
odinsy / curl.md
Created December 24, 2018 12:16 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

upstream statistics_dev {
server 172.17.0.3:80;
}
upstream alpha_dev {
server customer-care.default.svc.alpha-dev.k8s:8082;
}
upstream balancer {
server balancer-cloud.global.livetex:80;
#!/usr/bin/env bash
PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/sbin
set -e
timestamp=$(date "+%Y%m%d%H%M")
backup_dir=/mnt/backup/$(hostname)
# Create backup directories
mkdir -p "${backup_dir}"/{kubernetes,etcd}
- name: dnsmasq
image: "janeczku/go-dnsmasq:release-1.0.5"
args:
- --listen
- "127.0.0.1:53"
- --default-resolver
- --append-search-domains
- --hostsfile=/etc/hosts
- --verbose