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 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
@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
@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 / 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;
}
View gist:949593
#!/usr/bin/perl
print "Hello test"
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]
You can’t perform that action at this time.