Skip to content

Instantly share code, notes, and snippets.

View adamancini's full-sized avatar

ada mancini adamancini

View GitHub Profile

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@adamancini
adamancini / netshoot.yaml
Created November 17, 2023 21:01 — forked from randomvariable/netshoot.yaml
netshoot.yaml
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: netshoot
labels:
app: netshoot
spec:
updateStrategy:
type: RollingUpdate
#!/bin/bash
set -e
bail() {
printf "${RED}$1${NC}\n" 1>&2
exit 1
}
function registry_pki_secret() {
@adamancini
adamancini / README.md
Created October 25, 2021 22:16 — forked from eusonlito/README.md
Strong iptables and ipset protection

Protect your server with a strong iptables rules and ipset lists.

1. Install ipset to manage ipstables lists

apt install ipset

2. Install iptables-persistent to preserve iptables rules on reboot

docker run -p 39013:39013 \
-p 39017:39017 \
-p 39041-39045:39041-39045 \
-p 1128-1129:1128-1129 \
-p 59013-59014:59013-59014 \
-v /hana/:/hana/mounts \
--ulimit nofile=1048576:1048576 \
--sysctl kernel.shmmax=1073741824 \
--sysctl net.ipv4.ip_local_port_range='40000 60999' \
--sysctl kernel.shmmni=524288 \
@adamancini
adamancini / Arch Linux, Fedora
Created April 26, 2018 18:34 — forked from elvetemedve/Arch Linux, Fedora
Allow Vagrant usage without providing sudo password
sudo tee /etc/sudoers.d/vagrant > /dev/null << EOL
#
# Arch Linux, Fedora sudoers entries
#
# Allow passwordless startup of Vagrant with vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts
%sudo ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE
#!/bin/bash
#run anywhere with curl and jq installed.
# 11/17 - [email protected]
set -e
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
password=Pa22word
@adamancini
adamancini / readme.md
Created November 9, 2017 01:07 — forked from anonymous/readme.md
extract images from DTR with oss registry

Sometimes it may be necessary to extract the images from a DTR volume backup. In the absence of a functioning DTR cluster, it's possible to extract these images using the open-source registry image.

First, identify the registry volume that needs to be extracted:

root@dtr-node1:~# docker volume ls --filter=name=dtr
DRIVER              VOLUME NAME
local               dtr-ca-a2382528a00b
local               dtr-postgres-a2382528a00b
local dtr-registry-a2382528a00b
version: '2'
services:
wekandb:
image: mongo:3.2.16
container_name: wekan-db
restart: always
command: mongod --smallfiles --oplogSize 128
networks:
RUN apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A \
&& sed -i '/repo.percona.com/d' /etc/apt/sources.list \
&& sh -c 'echo "deb http://repo.percona.com/apt precise main" >> /etc/apt/sources.list' \
&& sh -c 'echo "deb-src http://repo.percona.com/apt precise main" >> /etc/apt/sources.list' \
&& apt-get -q -y update
&& apt-get -o Dpkg::Options::='--force-confnew' -qqy install \
nano \
wget \
psmisc \
libdbi-perl \