Skip to content

Instantly share code, notes, and snippets.

Walter Werther wwerther

Block or report user

Report or block wwerther

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View register_new_protocol.reg
REGEDIT4
[HKEY_CLASSES_ROOT\biss]
@="URL:biss Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\biss\shell]
[HKEY_CLASSES_ROOT\biss\shell\open]
View gist:949593
#!/usr/bin/perl
print "Hello test"
@wwerther
wwerther / RestartService.ps1
Created Jun 25, 2011
restart remote services via Powershell
View RestartService.ps1
$computer='remote.example.com';
$servicename='TheServiceName';
$cred=Get-Credential;
function getsrv($servicename,$computer,$credentials) {
$servicename="Name='" + $servicename + "'";
return Get-WmiObject -Class Win32_Service -computer $computer -Credential $credentials -filter $servicename;
}
@wwerther
wwerther / rsnapshot_plug_cp_btrfs
Created Oct 22, 2011
a small shell script that can be used within rsnapshot as cmd_cp. It provides snapshots generated with btrfs instead of hard-links
View rsnapshot_plug_cp_btrfs
#!/bin/sh
# Arg 1: -al
# Arg 2: /testbtrfs/backups/hourly.0
# Arg 3: /testbtrfs/backups/hourly.1
btrfs subvolume snapshot $2 $3
@wwerther
wwerther / rsnapshot_plug_rm_btrfs
Created Oct 22, 2011
a small shell script that can be used within rsnapshot as cmd_rm. It provides snapshots generated with btrfs instead of hard-links
View rsnapshot_plug_rm_btrfs
#!/bin/sh
# Arg 1: -rf
# Arg 2: /testbtrfs/backups/hourly.4/
# echo 1: $1 2: $@
# Try to delete the given path with btrfs subvolume delete first
# if this fails fall back to normal rm
if [ "$1" = "-rf" -a "$3" = "" ]; then
View gist:1306208
# Reverse the order of all intervals from /etc/rsnapshot.conf
#interval hourly 3
#interval daily 7
#interval weekly 4
##interval monthly 3
#
# all single commands below should be possible to be scripted within a bash loop
# by defining a function called interval and a process afterwards..
# to get all defined intervals from /etc/rsnapshot you can use grep
View gist:1306374
#################################################
# rsnapshot.conf - rsnapshot configuration file #
#################################################
# #
# PLEASE BE AWARE OF THE FOLLOWING RULES: #
# #
# This file requires tabs between elements #
# #
# Directories require a trailing slash: #
# right: /home/ #
@wwerther
wwerther / gist:1306377
Created Oct 22, 2011
rsnapshot.old.conf
View gist:1306377
#################################################
# rsnapshot.conf - rsnapshot configuration file #
#################################################
# #
# PLEASE BE AWARE OF THE FOLLOWING RULES: #
# #
# This file requires tabs between elements #
# #
# Directories require a trailing slash: #
# right: /home/ #
@wwerther
wwerther / updatehe.sh
Created Nov 8, 2011
Small Script to update Tunnelbroker IPv4-address
View updatehe.sh
#!/bin/sh
USERID=<USERID from TUNNELBROKER.NET>
PASSWORD=<PASSWORD>
TUNNELID=<YOUR TUNNEL ID>
LOGSTATE=/tmp/updatehe.stat
if [ -e "$LOGSTATE" ] ; then
LASTIP=`cat $LOGSTATE`
You can’t perform that action at this time.