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 | |
set -e | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 filename.pfx" >&2 | |
exit 1; | |
fi | |
if [ ! -e "$1" ]; then | |
echo "File not found: $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
namespace FixEnterpriseWsdl | |
{ | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Xml; | |
/// <summary> | |
/// Implements a fix for https://developer.salesforce.com/forums?id=906F0000000AiPEIA0 |
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
tcpdump -A -s 10240 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-]+: " | sed -r 's/^........(GET |HTTP\/|POST |HEAD )/\n\1/g' |
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
apt-get autoremove && apt-get update | |
apt-get install unattended-upgrades update-notifier-common | |
dpkg-reconfigure --priority=low unattended-upgrades | |
# choose yes | |
nano /etc/apt/apt.conf.d/50unattended-upgrades | |
# set Unattended-Upgrade::Remove-Unused-Dependencies "true"; | |
# set Unattended-Upgrade::Automatic-Reboot "true"; | |
# force install, using old config file if original is modified |
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
@echo off | |
cmdkey.exe /list > "%TEMP%\List.txt" | |
findstr.exe Target "%TEMP%\List.txt" > "%TEMP%\tokensonly.txt" | |
FOR /F "tokens=1,2 delims= " %%G IN (%TEMP%\tokensonly.txt) DO cmdkey.exe /delete:%%H | |
del "%TEMP%\List.txt" /s /f /q | |
del "%TEMP%\tokensonly.txt" /s /f /q | |
echo All done | |
pause |
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
visudo | |
username ALL=(ALL) NOPASSWD: ALL |
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/sh | |
### BEGIN INIT INFO | |
# Provides: | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO |
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
$ErrorActionPreference="Stop" | |
$vmname = read-host 'What name should the new VM have?' | |
$destdrive = read-host 'What drive should the new VM live on?' | |
$sourcevhdx = read-host 'What is the full path to the source VHDX? (enter for blank)' | |
$lan = read-host 'What virtual switch (name) should the VM be connected to? (enter for default)' | |
$destpath = $destdrive + ':\HyperV' | |
$vmrootpath = join-path $destpath $vmname |
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
$admin=[adsi]"WinNT://./oldname,user" | |
$admin.psbase.rename("newname") | |
#$admin.SetPassword("") | |
$admin.CommitChanges() | |
$admin=[adsi]"WinNT://./vagrant,user" | |
$admin.psbase.rename("Administrator") | |
#$admin.SetPassword("") | |
$admin.CommitChanges() |
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
$ErrorActionPreference = "Stop" | |
# run like this: | |
# import-module vmtools.psm1 | |
# move-vm -VmName "test-vm" -DestRoot "c:\HyperV" | |
function Move-VM { | |
[CmdletBinding()] | |
param ( | |
[parameter(Mandatory=$true)] [string]$VmName, |
OlderNewer