Skip to content

Instantly share code, notes, and snippets.

View visibilityspots's full-sized avatar

Jan Collijs visibilityspots

View GitHub Profile
@jedi4ever
jedi4ever / dns tuning ssh login speedup vagrant
Created May 27, 2013 13:37
speeding up DNS/SSH connections in vagrant
- Tune /etc/ssh/sshd_config
UseDNS no # Disable DNS lookups
GSSAPIAuthentication no # Disable negotation of slow GSSAPI
don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it
- Tune Vagrantfile
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
@rasschaert
rasschaert / arch_bootstrap.bash
Last active July 27, 2022 12:43
Shell script that performs the installation of Arch Linux the way I like it.
#!/bin/bash
bootstrapper_dialog() {
DIALOG_RESULT=$(dialog --clear --stdout --backtitle "Arch bootstrapper" --no-shadow "$@" 2>/dev/null)
}
#################
#### Welcome ####
#################
bootstrapper_dialog --title "Welcome" --msgbox "Welcome to Kenny's Arch Linux bootstrapper.\n" 6 60
#!/bin/bash
( echo 'VM|Status|IP|Memory|OS';
for node in `lxc-ls -1`; do
tmpfile=`mktemp -t lxc-info-$node-XXXXXXX`;
lxc-info -n $node | sed 's@[ ]*:[ ]*@:@' > $tmpfile
status=$( cat $tmpfile | grep 'State:' | awk -F: '{print $2}' );
ip=""; mem=""; os=""; osver="";
if [ "$status" == "RUNNING" ]; then
@mortensteenrasmussen
mortensteenrasmussen / cleanupManifestsWithoutTags.sh
Last active June 12, 2024 18:14
Clean up untagged manifests in private docker registry
#!/bin/bash
REGISTRY_DIR=YOUR_REGISTRY_DIR/data/docker/registry/v2/repositories
REGISTRY_URL=http://10.10.10.10:5000
#add --insecure to the curl command on line 17 if you use https with self-signed certificates
cd ${REGISTRY_DIR}
count=0
manifests_without_tags=$(comm -23 <(find . -type f -name "link" | grep "_manifests/revisions/sha256" | grep -v "\/signatures\/sha256\/" | awk -F/ '{print $(NF-1)}' | sort) <(for f in $(find . -type f -name "link" | grep "_manifests/tags/.*/current/link"); do cat ${f} | sed 's/^sha256://g'; echo; done | sort))