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
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
$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, |
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 the script in an elevated Powershell like this: | |
# iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/tomfanning/f75f6a808a9265b48af0/raw/')) | |
#todo: - install windows photo viewer, make it the default | |
# - unpin the remaining crud from the start menu | |
function Set-RegValue | |
{ |
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
#apt-get install --install-recommends linux-tools-virtual-lts-vivid linux-cloud-tools-virtual-lts-vivid | |
apt-get install hv-kvp-daemon-init | |
linux-virtual? | |
linux-cloud-tools-virtual | |
linux-tools-virtual |
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 | |
rem Licensed to the Apache Software Foundation (ASF) under one or more | |
rem contributor license agreements. See the NOTICE file distributed with | |
rem this work for additional information regarding copyright ownership. | |
rem The ASF licenses this file to You under the Apache License, Version 2.0 | |
rem (the "License"); you may not use this file except in compliance with | |
rem the License. You may obtain a copy of the License at | |
rem | |
rem http://www.apache.org/licenses/LICENSE-2.0 |
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
del results.jtl | |
pushd C:\Users\Administrator\Desktop\apache-jmeter-2.13\bin | |
call jmeter.bat -n -t ..\..\jmeter-results\test-plan.jmx | |
popd | |
pause |
OlderNewer