This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This checks which ports haproxy currently is listening on, temporarily drops SYN packets | |
# to prevent new connections, reloads haproxy, then allows SYNs again. | |
# | |
# Based on info from here: | |
# * https://github.com/aws/opsworks-cookbooks/pull/40 | |
# * http://www.mail-archive.com/haproxy@formilux.org/msg06885.html | |
#set -x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from xivo_auth_client import Client as Auth | |
from xivo_confd_client import Client as Confd | |
auth = Auth('127.0.0.1', username='sylvain', password='sylvain', verify_certificate=False) | |
token_data = auth.token.new('xivo_user', expiration=10) | |
token = token_data['token'] | |
uuid = token_data['xivo_user_uuid'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To get started with Docker/Marathon/Mesos, you need to install a | |
new Mesos, a new Marathon, and Deimos, the bridge to Docker. | |
You'll also need Docker and the JVM. These instructions are for | |
Ubuntu 13.10. | |
## Install Mesos prerequisites | |
:; sudo apt-get update | |
:; sudo apt-get install zookeeperd default-jre python-setuptools python-protobuf curl pip | |
## Install recent Mesos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.2" | |
services: | |
zk: | |
image: confluentinc/cp-zookeeper:5.1.0 | |
hostname: zk | |
container_name: zk | |
restart: unless-stopped | |
ports: | |
- "2181:2181" | |
environment: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemd = { | |
services = { | |
"macchanger-wireless" = { | |
description = "Changes MAC of my wireless interface for privacy reasons"; | |
wants = [ "network-pre.target" ]; | |
wantedBy = [ "multi-user.target" ]; | |
before = [ "network-pre.target" ]; | |
bindsTo = [ "sys-subsystem-net-devices-wlp3s0.device" ]; | |
after = [ "sys-subsystem-net-devices-wlp3s0.device" ]; | |
script = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This isn't meant to be ran as a script, but line-by-line | |
# Props to Binary (benary.org) for helping me with this | |
# 0: Create a Scaleway instance and SSH into it | |
ssh root@... | |
# 1: Install Nix | |
adduser user # set a password, doesn't matter what because it's not staying long | |
adduser user sudo | |
su -l user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source /etc/environment | |
hostname=$(cat /etc/machine-id) | |
machines=$(etcdctl ls /consul.io/bootstrap/machines) | |
#If there are 'machines' then the cluster has been initialised. | |
if [ -z "$machines" ] | |
then | |
flags="${flags} -bootstrap" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin | |
docker_pid=$(cat /var/run/docker.pid) | |
gdb -p $docker_pid <<< "$( ls /proc/$docker_pid/fd -l --time-style=+'%s' | grep -E 'deleted' | awk '{ printf("p close(%s)\n", $7)}')" >/dev/null | |
#closing evenfds that do not have a corresponding memory.oom_control | |
eventfds="$(for eventfd in $(ls /proc/$docker_pid/fd -l --time-style=+'%s' | grep -E 'eventfd'| awk '{print $7}'); do | |
memory_pid=$((eventfd - 1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://gist.github.com/f11e690295311d8d7dd53b5128bd6d3e | |
##################################### | |
# Tekton vs. Argo Workflows # | |
# Kubernetes-Native CI/CD Pipelines # | |
# https://youtu.be/dAUpAq7hfeA # | |
##################################### | |
# Referenced videos: | |
# - Tekton - Kubernetes Cloud-Native CI/CD Pipelines And Workflows: https://youtu.be/7mvrpxz_BfE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
realm=Sonatype Nexus Repository Manager | |
host=nexus.company.com | |
user=admin | |
password=admin123 |
OlderNewer