This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
$rev=40469 ; $url="svn://svn/test/branches/1.0.3" ; $clonedir="C:\source\test" ; $gitbin="${env:ProgramFiles(x86)}\Git\bin" ; cmd /c "svn diff --force --patch-compatible --diff-cmd `"$gitbin\diff.exe`" -x `"--text --unified`" -c $rev $url | git apply --directory=`"$clonedir`" -p0 --reject --verbose -" |
This file contains hidden or 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
import com.gitblit.GitBlit | |
import com.gitblit.utils.JGitUtils | |
import org.eclipse.jgit.lib.Repository | |
import org.slf4j.Logger | |
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7.2' ) | |
import groovyx.net.http.RESTClient | |
import groovyx.net.http.HttpResponseException | |
import groovyx.net.http.ContentType |