Skip to content

Instantly share code, notes, and snippets.

@broxio
broxio / install.txt
Created July 23, 2020 02:16
Create USB Installation media for macOS High Sierra
/Applications/Install macOS High Sierra.app/Contents/Resources ⌚ 9:54:06
$ sudo ./createinstallmedia --volume /Volumes/HighSierra
Password:
Ready to start.
To continue we need to erase the volume at /Volumes/HighSierra.
If you wish to continue type (Y) then press return: Y
Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
@broxio
broxio / install.sh
Created May 28, 2020 04:03
Compile haproxy at ec2
#!/bin/bash
HAPROXY="2.1.4"
OPENSSL="1.1.1g"
LUA="5.3.5"
SRC="/usr/local/src"
sudo rm /usr/local/src/* -rf
sudo apt-get install make build-essential automake libreadline-dev libz-dev libpcre3-dev logrotate libpcre2-dev -y
cd $SRC/ && sudo wget https://www.lua.org/ftp/lua-$LUA.tar.gz && sudo tar -zxf lua-$LUA.tar.gz
cd lua-$LUA && sudo make linux && sudo make INSTALL_TOP=/opt/lua53 install
cd $SRC/ && sudo wget https://www.openssl.org/source/openssl-$OPENSSL.tar.gz && sudo tar -zxf openssl-$OPENSSL.tar.gz
moby@bogus:~$ sudo update-alternatives --config editor
There are 9 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/joe 70 auto mode
1 /bin/ed -100 manual mode
2 /bin/nano 40 manual mode
3 /usr/bin/jmacs 50 manual mode
4 /usr/bin/joe 70 manual mode
sudo sh -c "sed -i 's/^[0,|10,]/#&/g' /etc/crontab"
@broxio
broxio / rrdtooldebug
Created April 7, 2020 06:38
rrdtooldebug
RRDtool Command:
/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--pango-markup \
--title='Blade_702_1 - Traffic - Gi1/0/1' \
--vertical-label='bits per second' \
madpenguin@ngx-master:/srv/pillar/server$ sudo salt -C 'G@role:pushnode-haproxy' cmd.run "uptime"
pushnode08:
17:13:56 up 194 days, 3:25, 1 user, load average: 0.45, 0.51, 0.48
pushnode10:
17:13:56 up 194 days, 3:25, 1 user, load average: 0.54, 0.62, 0.62
pushnode09:
17:13:56 up 194 days, 2:26, 0 users, load average: 0.32, 0.42, 0.41
pushnode07:
17:13:56 up 194 days, 2:49, 0 users, load average: 0.73, 0.81, 0.80
pushnode01:
Installing WMIC on Ubuntu 16.04
Step 1 – Install building applications
sudo apt-get install autoconf make gcc libdatetime-perl build-essential g++ python-dev
Step 2 – Download the ‘wmic’ source
cd ~
wget http://www.opsview.com/sites/default/files/wmi-1.3.16.tar_.bz2
Step 3 – Untar the source
@broxio
broxio / gist:d29ba092d714238333fc902e133e60cf
Created June 13, 2019 07:13
Create USB bootable for MacOSX Mojave
~  sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Mojave
Ready to start.
To continue we need to erase the volume at /Volumes/Mojave.
If you wish to continue type (Y) then press return: Y
Erasing disk: 0%... 10%... 20%... 30%... 100%
Copying to disk: 0%... 10%... 20%... 30%...
pi@raspberrypi:~ $ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: update available
[i] FTL: update available
[i] Web Interface: update available
[i] Updating Pi-hole core and web admin files
[✓] Check for existing repository in /etc/.pihole
[✓] Update repo in /etc/.pihole
@broxio
broxio / gist:357e094f7abbaf6e8888d04884c747ca
Created February 26, 2019 08:01
safe upgrade salt-minion
sudo salt -C 'G@role:nyc-haproxy' cmd.run "apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install --only-upgrade salt-minion -y"