Skip to content

Instantly share code, notes, and snippets.

View aambert's full-sized avatar

Aurélien AMBERT aambert

View GitHub Profile
@aambert
aambert / create-existing-folder-permissions.sh
Created April 1, 2022 15:29 — forked from davoult/create-existing-folder-permissions.sh
openshift vsphere permissions with govc
#!/bin/bash
set -e
set -x
declare -A roles
VCENTER="Cns.Searchable InventoryService.Tagging.AttachTag InventoryService.Tagging.CreateCategory InventoryService.Tagging.CreateTag InventoryService.Tagging.DeleteCategory InventoryService.Tagging.DeleteTag InventoryService.Tagging.EditCategory InventoryService.Tagging.EditTag Sessions.ValidateSession StorageProfile.View"
VCENTER_ROLE_NAME="openshift-vcenter-level"
@aambert
aambert / nginx-tuning.md
Created July 19, 2020 18:33 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@aambert
aambert / sysctl.conf
Created May 10, 2020 12:02 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
#
# See also: https://gist.github.com/kgriffs/4027835
#
# Assumes a beefy machine with lots of network bandwidth
@aambert
aambert / db_backup.sh
Created April 2, 2020 09:16 — forked from hackedunit/db_backup.sh
Backup PostgreSQL dump to Microsoft Azure Blob Storage
#!/bin/bash
# Requires azure-cli to be installed
source $HOME/.profile
if [ "${POSTGRES_HOST}" = "" ]; then
if [ -n "${POSTGRES_PORT_5432_TCP_ADDR}" ]; then
POSTGRES_HOST=$POSTGRES_PORT_5432_TCP_ADDR
POSTGRES_PORT=$POSTGRES_PORT_5432_TCP_PORT
@aambert
aambert / docker-compose.yml
Created March 11, 2020 17:46 — forked from smashnet/docker-compose.yml
Docker-Compose: Mastodon v3.0.1 with Traefik v2
version: '3'
# Variables to fill in:
# Line 22: <LETSENCRYPT_MAIL_ADDRESS> - your mail address for contact with Let's Encrypt
# Line 35: <TRAEFIK_DASHBOARD_ADMIN_PASSWORD> - MD5 hash of your password (use http://www.htaccesstools.com/htpasswd-generator/)
# Lines 30, 82, 106: <DOMAIN> - e.g. social.yourdomain.com (Must have an A record pointing to your box' IP) (AAAA for IPv6 ;)
services:
traefik:
image: traefik:v2.1
@aambert
aambert / go-install-wsl.sh
Created September 2, 2019 13:16 — forked from westdavidr/go-install-wsl.sh
Script to install Go 1.10 on WSL
#!/bin/bash
set -e
GVERSION="1.10"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/projects/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@aambert
aambert / docker-compose.yml
Created July 8, 2019 22:21 — forked from gam-phon/docker-compose.yml
pi-hole and DNS over HTTPS docker-compose
version: "3"
# Thanks to https://visibilityspots.org/dockerized-cloudflared-pi-hole.html
# echo "alias dns-up='cd /path/to/folder; docker-compose up -d'" >> ~/.bash_profile
services:
dns-over-https:
container_name: dns-over-https
image: fardog/secureoperator:latest # google dns
# image: visibilityspots/cloudflared:amd64 # cloudflare dns
restart: unless-stopped
networks:
resource "azurerm_virtual_machine_extension" "domjoin" {
name = "domjoin"
location = "${var.location}"
resource_group_name = "${var.image_resource_group}"
virtual_machine_name = "${var.prefix}"
publisher = "Microsoft.Compute"
type = "JsonADDomainExtension"
type_handler_version = "1.3"
# What the settings mean: https://docs.microsoft.com/en-us/windows/desktop/api/lmjoin/nf-lmjoin-netjoindomain
settings = <<SETTINGS
@aambert
aambert / .gitignore
Created April 19, 2019 13:56 — forked from mauilion/.gitignore
terraform to generate tls assets for etcd.
*tfstate*
.terraform
etcd
certs
ca-keys
@aambert
aambert / tensorflow-Ubuntu.yml
Created March 4, 2019 11:52 — forked from m3nu/tensorflow-Ubuntu.yml
Ansible Playbook to set up Tensorflow and Keras on Ubuntu 16.04
---
- name: Install Tensorflow and Keras on ubuntu1604
hosts: all
become: yes
handlers:
- include: roles/common/handlers/main.yml
vars:
- cuda_network_installer: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
- cuda_apt_key: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub