Skip to content

Instantly share code, notes, and snippets.

View sq3's full-sized avatar
🚀
Raketen Style

Marc Schnitzius sq3

🚀
Raketen Style
View GitHub Profile
#!/usr/bin/env python
import suds
def get_service_information(service_tags):
url = "http://xserv.dell.com/services/assetservice.asmx?WSDL"
client = suds.client.Client(url)
service_information = []
@sq3
sq3 / teamvault-development-environemt-docker
Last active August 29, 2015 14:23
TeamVault development environment - Docker
#!/bin/bash
# A quick and dirty ...
# _______________ __ ____ _____ __ ____ ______
# /_ __/ ____/ | / |/ / | / / | / / / / / /_ __/
# / / / __/ / /| | / /|_/ /| | / / /| |/ / / / / / /
# / / / /___/ ___ |/ / / / | |/ / ___ / /_/ / /___/ /
# /_/ /_____/_/ |_/_/ /_/ |___/_/ |_\____/_____/_/
#
# ... development environment.
@sq3
sq3 / zfs-upgrade.sh
Last active July 21, 2016 11:10
Arch system and ZFS upgrade
#!/bin/bash
# colours
GREEN='\033[0;32m'
NC='\033[0m'
CWD=/tmp/zfs-$(date +%Y-%m-%d)
mkdir $CWD
cd $CWD
# confirm you can access the internet
if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "200 OK" ]]; then
echo "Your Internet seems broken. Press Ctrl-C to abort or enter to continue."
read
fi
# make 2 partitions on the disk.
parted -s /dev/sda mktable msdos
parted -s /dev/sda mkpart primary 0% 100%
@sq3
sq3 / get-arch-iso-url.py
Last active January 20, 2017 14:58
Get .iso URL of the latest ArchLinux release
#!/usr/bin/env python
# coding=utf8
import re
import urllib2
matches = []
feed_url = 'https://www.archlinux.org/feeds/release/'
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias l='ls -lahtr --color=auto --time-style="+ %F %H:%M │ "'
alias ll='ls -l --color=auto --time-style="+ %F %H:%M │ "'
alias grep='grep --color=auto'
export PS1="\[\u@$(hostname -f): \w\]\n\$ "
[ -e "/etc/DIR_COLORS" ] && DIR_COLORS="/etc/DIR_COLORS"
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only root or user avahi can own the Avahi service -->
<policy user="avahi">
<allow own="org.freedesktop.Avahi"/>
</policy>
<policy user="root">
@sq3
sq3 / nspawn-plex.service
Created February 15, 2017 18:53
systemd-nspawn-plex example service file
[Unit]
Description=Container Plex
Documentation=man:systemd-nspawn(1)
PartOf=machines.target
Before=machines.target
After=network.target zfs-mount.service
[Service]
ExecStart=/usr/bin/systemd-nspawn \
--quiet \
@sq3
sq3 / zfs-arch-install.sh
Last active May 16, 2018 08:19
setup zfs on arch
#!/bin/bash
# this script isntalls zfs via dkms and needs sudo package installed an
# configured for the user who runs this script.
#
# The zpools are named tank.
# Give the disk you want to use for the zpool as $1
#
# https://wiki.archlinux.org/index.php/ZFS
@sq3
sq3 / autocommit.sh
Created April 27, 2017 12:41
Auto-commit on inotify change triggerd by systemd.path
#!/bin/bash
REPO_PATH=$1
cd $REPO_PATH
git=$(which git)
git add -A && git commit -m "Scripted auto-commit on change triggerd by systemd.path"