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 script is for Ubuntu to download and install XRDP+XORGXRDP via | |
# source. | |
# | |
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips. | |
# | |
############################################################################### |
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 | |
set -euo pipefail | |
grep $1 /var/log/apt/history.log | mawk '/Install:.*/{gsub(":amd64 [(][^)]*[)][,]?","");gsub("^Install: ","apt purge ");print}' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Water Usage</title> | |
<style type="text/css"> | |
html, body { margin: 0; padding 0; width: 100%; height: 100%;} | |
iframe { border: 0; width: 100%; height: 99%; } | |
</style> | |
</head> |
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 | |
STOR=local-lvm | |
SUBN=10.10.10 | |
GW=10.10.10.1 | |
DNS=10.10.10.2 | |
SDOM=example.com | |
mk_template() { | |
cd /tmp |
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
--- /root/apt-mirror 2019-11-25 14:37:04.773325607 -0500 | |
+++ /usr/bin/apt-mirror 2019-11-25 14:17:29.947079216 -0500 | |
@@ -520,7 +520,8 @@ | |
if ( @parts == 3 ) | |
{ | |
my ( $sha1, $size, $filename ) = @parts; | |
- if ( $filename =~ m{^$component/i18n/Translation-[^./]*\.bz2$} ) | |
+ #if ( $filename =~ m{^$component/i18n/Translation-[^./]*\.bz2$} ) | |
+ if ( $filename =~ m{^$component/i18n/Translation-[^./]*\.(gz|bz2|xz)$} ) | |
{ |
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
FROM python:2 | |
RUN git clone https://github.com/lmco/dart.git /opt/dart | |
WORKDIR /opt/dart | |
RUN sed -i s/lxml==3.6.0/lxml/ requirements.txt && \ | |
pip install -r requirements.txt | |
RUN python manage.py makemigrations && \ |
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 | |
#https://bit.ly/2Mfzfc5 | |
gdisk /dev/sda | |
cryptsetup luksFormat /dev/sda2 | |
cryptsetup luksOpen /dev/sda2 lvm | |
lvm pvcreate /dev/mapper/lvm | |
vgcreate vg0 /dev/mapper/lvm |
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 | |
# https://git.io/vFx6N | |
touch ~/.ssh/authorized_keys | |
chmod 644 ~/.ssh/authorized_keys | |
echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDAxQGDxiq/EhCQR5xwf3DtJqm6s4pY+YAU8vWpt/NnWzB6w0MY6xF63Iyj6jTyaRBFDwH63kESsLFU/lvS6Cpq1K2yqhOzomi2qgagzu5eTrUCYPaJW+9JpMMTEvTsdyMAAVqxe38OkSUAfU+MGROaOrOZ2F/7qreoghL3A5NEQRkp/RhkNJDw+/rPWw/J2S8SPYaOfnYB+e3J6eNN8O3/J38CCut72fwTuwjrx9btvPMIty5uf5P/wvppRqbvT9d505j2TT7kO6Pumulh9uZNldmWmmCxdQHhmFpn2yrUnXn/ZY7Aorw3g7eccRvXzjM99UGki6wyl1XHV82OG8c21jG5wWChhCVztwvGxTNJxsQb8dv5Lm9U/2/YfFGmcp6qLH68G8ZN9huDOPtAIA8jN5icEUtLluWn5aAjgh+dkzuQcN6/1Zl/Jk32LGKKj9JdWislhY5oxQVt3lBUwMElwJvNu8vWKHyVl1qvp0nFRp03Hw9qPC6cuDTM36CqbhThexBmrdtCwjVXXcDbPWg0i68g1XwBaXj5mIOgCM1cpZ22FRAJs3LY7lED1WF8U5yY2zvUdOjpqCnomY9Vbx85Gime5facqlRyekLcqHmgE1LCo4maZTuVEqMgIQUYBxExqkFyG5O1Ek89IZcFHZLSLzY6+8byUrIaUCS55l/fYQ== ansible@c0.adams.network >> ~/.ssh/authorized_keys | |
sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config | |
sed -i 's/PermitRootLogin yes/PermitRootLogin without-passwo |
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
for s in $(for i in us*; do ping -c 1 -W 1 $(awk '/remote / {print $2}' $i) | awk '/bytes from/'; done | sort -t= -nk4 | head -10 | awk '{print $4}' | sed 's/.$//'); do grep -l $s us*; done |
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/vbash | |
source /opt/vyatta/etc/functions/script-template | |
if !(/bin/ping -c 1 192.168.1.2 &>/dev/null) | |
then | |
if [ ! -f /config/fw.down ] | |
then | |
touch /config/fw.down | |
configure | |
delete interfaces ethernet eth1 address |
NewerOlder