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 | |
command -v lspci >/dev/null 2>&1 || { echo "lspci (pkg pciutils) required for this script" >&2 ; exit 1 ; } | |
command -v lsusb >/dev/null 2>&1 || { echo "lsusb (pkg usbutils) required for this script" >&2 ; exit 1 ; } | |
command -v dmidecode >/dev/null 2>&1 || { echo "dmidecode (pkg dmidecode) required for this script" >&2 ; exit 1 ; } | |
command -v biosdecode >/dev/null 2>&1 || { echo "biosdecode (pkg dmidecode) required for this script" >&2 ; exit 1 ; } | |
command -v dmesg >/dev/null 2>&1 || { echo "dmesg (pkg util-linux) required for this script" >&2 ; exit 1 ; } | |
command -v git >/dev/null 2>&1 || { echo "git (pkg git-core) required for this script" >&2 ; exit 1 ; } | |
command -v svn >/dev/null 2>&1 || { echo "svn (pkg subversion) required for this script" >&2 ; exit 1 ; } | |
command -v make >/dev/null 2>&1 || { echo "make (pkg build-essential base-devel ...) required for this script" >&2 ; exit 1 ; } |
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
# install opensuse, 'server minimal selection', enable ssh | |
# disable firewall (and on boot) under security in yast | |
zypper install btrfsprogs nano smartmontools msmtp-mta mailx samba tmux | |
######## network interface bonding ########## | |
# yast > network devices > network settings | |
# Overview > Add > Device type = bond |
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 | |
cat <<-'EOF' | sudo tee /usr/local/sbin/purge-old-kernels | |
#!/bin/sh | |
#This script will keep the currently running kernel and 2 latest | |
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
if [ "$(id -u)" != 0 ]; then | |
echo "ERROR: This script must run as root." 1>&2 |
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
using http://nssm.cc/usage | |
Install BTSync | |
Configure your shared folders | |
Make sure you uncheck the "Start btsync when windows starts" option in the preferences. | |
Download nssm, as an admin run "nssm install BTSync" | |
Put in the path to the BTSync.exe | |
Open windows service manager and tell it to run BTSync as the user you just used to install. | |
Make sure BTSync isn't already running, then start the service. |
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
# Uses http://www.ltr-data.se/opencode.html/#ImDisk virtual disk driver for windows 7 or less | |
# Tries to use chocolatey to install imdisk | |
# Sample use case: | |
# Import-Module ".\mount.iso.psm1" | |
# Invoke-IsoExe "C:\test.iso" "setup.exe" "/passive" | |
function Mount-Iso([string] $isoPath) | |
{ | |
if ( -not (Test-Path $isoPath)) { throw "$isoPath does not exist" } |
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
<assemblyfileset id="sys.assemblies"> | |
<include name="System.dll" /> | |
<include name="System.Net.dll" /> | |
</assemblyfileset> | |
<script language="C#"> | |
<references refid="sys.assemblies" /> | |
<imports> | |
<import namespace="System.Net" /> | |
<import namespace="System.Net.Sockets" /> |
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 | |
read -e -n1 -p "flash pfSense to CF card [y/N]: " OPTION | |
if [ "$OPTION" == "y" ]; then | |
imgfile=pfSense-2.1-RELEASE-1g-i386-nanobsd.img.gz | |
if [ ! -f $imgfile ]; then | |
read -e -n1 -p "download $imgfile [y/N]: " OPTION | |
if [ "$OPTION" == "y" ]; then |
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
# /etc/init/videobridge.conf | |
description "jitsi videobridge" | |
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on shutdown | |
exec start-stop-daemon --start \ |
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 | |
ffplay -vn -rtsp_transport tcp -allowed_media_types audio -nodisp rtsp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream |
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
location /owncloud { | |
client_max_body_size 1024M; | |
location ~ ^/owncloud/(data|config|\.ht|db_structure\.xml|README) { | |
deny all; | |
} | |
rewrite ^/owncloud/.well-known/host-meta /public.php?service=host-meta last; | |
rewrite ^/owncloud/.well-known/host-meta.json /public.php?service=host-meta-json last; | |
rewrite ^/owncloud/.well-known/carddav /remote.php/carddav/ redirect; |