Skip to content

Instantly share code, notes, and snippets.

View DickSwart's full-sized avatar

Dick Swart DickSwart

View GitHub Profile
@DickSwart
DickSwart / stop-mac-apache.sh
Created May 11, 2018 03:46 — forked from barbietunnie/stop-mac-apache.sh
Stop Default Apache server running on Mac OS Sierra
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
@DickSwart
DickSwart / dropbox.py
Last active August 5, 2018 05:03 — forked from riemers/dropbox.py
Python uploader for dropbox (original found at https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=164166)
import os
import subprocess
from subprocess import Popen, PIPE
#The directory to sync
syncdir="/home/homeassistant/.homeassistant/"
#Path to the Dropbox-uploaded shell script
uploader = "/home/pi/scripts/dropbox_uploader.sh"
#If 1 then files will be uploaded. Set to 0 for testing
@DickSwart
DickSwart / proxmox.txt
Last active October 16, 2020 18:25 — forked from whiskerz007/gist:53c6aa5d624154bacbbc54880e1e3b2a
How to setup a community version of Proxmox VE 5.x-6.x
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
apt-get update
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
apt-get update
# Remove nag
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script