Quantcast
Channel: Recent Gists from freuds
Browsing all 28 articles
Browse latest View live

Commandes de Docker

memento.mdCommandes de DockerCommandes de basesrunLa commande run permet d'instancier un container à partir d'une image. Executer une instruction dans un container :docker run ubuntu:14.04 echo"hello...

View Article



Ansible 1.3 Conditional Execution -- Very complete example with comments -- I...

ansible_conditionals_examples.yaml---# This has been tested with ansible 1.3 with these commands:# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts...

View Article

Ansible /etc/network/interfaces template

gistfile1.txt# {{ ansible_managed }}# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network...

View Article

Best nginx configuration for improved security(and performance). Complete...

gistfile1.sh# to generate your dhparam.pem file, run in the terminalopenssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048nginx.conf# read more here...

View Article

Bash Benchmark Script (using time)

benchmark.sh#!/bin/bash# REQUIRES SUDO# Benchmark runnerrepeats=20output_file='benchmark_results.csv'command_to_run='echo 1'run_tests() {#...

View Article


rsyslog-graylog.md

rsyslog-graylog.mdSending syslog from Linux systems into GraylogThe two most popular syslog deamons (the programs that run in the background to accept and write or forward logs) are rsyslog and...

View Article

Exporting and Importing Postgres Databases using gzip

psql-with-gzip-cheatsheet.sh# This is just a cheat sheet:# On productionsudo -u postgres pg_dump database | gzip -9 > database.sql.gz# On localscp -C production:~/database.sql.gzdropdb database...

View Article

Some useful Git aliases that I use every day

.gitconfig## Working with branches## Get the current branch name (not so useful in itself, but used in# other aliases)branch-name = "!git rev-parse --abbrev-ref HEAD"# Push the current branch to the...

View Article


My current .gitconfig aliases

.gitconfig[alias]co= checkoutcob= checkout -bcoo=!git fetch && git checkoutbr= branchbrd= branch -dbrD= branch -Dmerged= branch --mergeddmerged="git branch --merged | grep -v '\\*' | xargs -n 1...

View Article


Lightning Fast WordPress: Caddy+Varnish+PHP-FPM

00README.mdREADMEThis gist assumes you are migrating an existing site for www.example.com— ideally WordPress — to a new server — ideally Ubuntu Server 16.04 LTS — and wish to enable HTTP/2 (backwards...

View Article

Regular expression cheat sheet for Varnish (.vcl). Examples of vcl regexp....

vcl-regex-cheat-sheetRegular expression cheat sheet for VarnishVarnish regular expressions are NOT case sensitive. Varnish uses POSIXregular expressions, for a complete guide, see: "man 7 regex"Basic...

View Article

Google Cloud Platform VPN Examples.md

Google Cloud Platform VPN Examples.mdIn GCP Console, create VPC networks named vpn-1 and vpn-2 in us-east1 and europe-west1In Cloud Shell:Create VPN gatewaysgcloud compute target-vpn-gateways \ create...

View Article

varnishlog examples (version 4.x)

varnishlog-examples.sh# filter by request host headervarnishlog -q 'ReqHeader ~ "Host: example.com"'# filter by request urlvarnishlog -q 'ReqURL ~ "^/some/path/"'# filter by client ip (behind reverse...

View Article


Check zone DNSSEC

checksigned.sh#!/usr/bin/env bash checksigned() { ZONE=`basename "$1" .`.if [ "$ZONE"= .. ]then ZONE=.fi NAME=`basename "$ZONE" .` NO_NS=true NO_SEC=false OPTS="+cd +noall +answer +nocl +nottl" dig...

View Article

Setting Up CORS in HAProxy

haproxy-cors.mdfrontend localnodes bind *:80 reqadd X-Forwarded-Proto:\ http # Add CORS headers when Origin header is present capture request header origin len 128 http-response add-header...

View Article


Shell/Bash script for sending slack messages.

slack.sh#!/usr/bin/env bash##################################################################################### Slack Bash console script for sending...

View Article

docker_usefull.md

docker_usefull.md#Commandes de Docker ##Commandes de bases ###run La commande run permet d'instancier un container à partir d'une image. Executer une instruction dans un container :docker run...

View Article


A basic .vimrc file that will serve as a good template on which to build.

.vimrc" Don't try to be vi compatiblesetnocompatible" Helps force plugins to load correctly when it is turned back on belowfiletypeoff" TODO: Load plugins here (pathogen or vundle)" Turn on syntax...

View Article

trusted certificates system update-ca-certificates

update-ca-certificates.mdAdding trusted root certificates to the serverMac OS Xsudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/new-root-certificate.crt sudo...

View Article

travis-terraform.yml

travis-terraform.yml# Define environmentdist: xenial # Ubuntu 16.04language: bash# Only build pushes to master branchbranches:only: - master# Export variablesenv: - tf_version=0.12.19...

View Article
Browsing all 28 articles
Browse latest View live




Latest Images