Skip to content

Instantly share code, notes, and snippets.

View fenneh's full-sized avatar
🔥
Hi

fen fenneh

🔥
Hi
View GitHub Profile
@fenneh
fenneh / msbuild-aliases.ps1
Created May 9, 2014 10:03
MSBuild Aliases
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0").MSBuildToolsPath -ChildPath "MSBuild.exe")
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5").MSBuildToolsPath -ChildPath "MSBuild.exe")
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0").MSBuildToolsPath -ChildPath "MSBuild.exe")
param
(
[string] $EnvironmentName,
[string] $Version,
[string] $ProjectName,
[string] $OctopusApiKey,
[string] $OctopusServerUrl,
[string] $ReleaseNotes
)
<Project DefaultTargets="CopyOutputs;DeployService" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<!-- These settings control what the service's name, description etc appear in services.msc task panel. -->
<PropertyGroup Label="ServiceMetaData">
<ServiceName>ShinyNewService</ServiceName>
<ServiceDisplayName>Shiny New Service</ServiceDisplayName>
<ServiceDescription>A shiny new service, that changes the world for the greater good.</ServiceDescription>
</PropertyGroup>
<Choose>
Set-StrictMode -Version Latest
$libPath = (Split-Path -Parent $MyInvocation.MyCommand.Definition)
Import-Module $libPath\SecurityLib.psm1
function New-WindowsService {
param
(
[Parameter(Mandatory=$True,Position=0,HelpMessage="The name of the Windows Service")]
[string]$serviceName,
@fenneh
fenneh / PSSessions.ps1
Created March 13, 2014 01:00
PS Sessions
New-PSSession
Enter-PSSession
Exit-PSSession
Remove-PSSession
@fenneh
fenneh / suckadick.json
Created December 27, 2013 21:58
Bypass Virgin Blocks using HTTP Referrer
[{"id":"defaultAction","val":"dummy","type":"normal","filter":"","is3rd":true},{"id":1388180579896,"val":"http://piratebay*","type":"specific","filter":"assets.virginmedia.com","isregexp":false,"isfrom":true,"isto":true,"is3rd":true},{"id":1388180601615,"val":"http://1337x.org","type":"specific","filter":"assets.virginmedia.com","isregexp":false,"isto":true},{"id":1388180702550,"val":"http://abmp3.com","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180723517,"val":"http://beemp3s.org","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180844591,"val":"http://bitsnoop.com","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180854934,"val":"http://bomb-mp3.com","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180861637,"val":"http://emp3world.cc","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180866825,"val":"http://extratorrent.cc","type":"specific","filter"
@fenneh
fenneh / wtf.ps1
Created December 6, 2013 15:10
Dan PS
$computers = Read-Host 'List computers to run against seperated by commas'
foreach($computer in $computers){
$width = (Get-WmiObject -ComputerName $computer -Class Win32_Processor).addresswidth
If($width -eq 64) Then
{psexec \\$computer msiexec /i \\Ukpddc01\netlogon\NSClient++\NSCP-0.4.1.102-x64.msi /quiet /norestart /log \\$computer\c$\NSClientInstall.log}
Else($width -eq 32) Then
{psexec \\$computer msiexec /i \\Ukpddc01\netlogon\NSClient++\NSCP-0.4.1.102-Win32.msi /quiet /norestart/log \\$computer\c$\NSClientInstall.log}
End If
}
function Set-SSLSecurityProtocols {
$protopath = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols"
& reg.exe add "$protopath\PCT 1.0\Server" /v Enabled /t REG_DWORD /d 00000000 /f
& reg.exe add "$protopath\SSL 2.0\Server" /v Enabled /t REG_DWORD /d 00000000 /f
& reg.exe add "$protopath\SSL 3.0\Server" /v Enabled /t REG_DWORD /d 00000001 /f
& reg.exe add "$protopath\TLS 1.0\Server" /v Enabled /t REG_DWORD /d 00000001 /f
& reg.exe add "$protopath\TLS 1.1\Server" /v Enabled /t REG_DWORD /d 00000001 /f
& reg.exe add "$protopath\TLS 1.1\Server" /v DisabledByDefault /t REG_DWORD /d 00000000 /f
& reg.exe add "$protopath\TLS 1.2\Server" /v Enabled /t REG_DWORD /d 00000001 /f
& reg.exe add "$protopath\TLS 1.2\Server" /v DisabledByDefault /t REG_DWORD /d 00000000 /f
@fenneh
fenneh / gist:5653601
Created May 26, 2013 18:24
Dururuirururmu Rotations
/ra G1 :: Red -> Blue -> Yellow :: Esinar, Tonz, Droodz, Milf, Tatsu, Cuttle, HP
/ra G2 :: Blue -> Yellow -> Red :: Gebuz, Araven, Mew, Tarrant, Essem, Puncehh
/ra G3 :: Yellow -> Red -> Blue :: Fen, Shen, Ani, Critten, Mean, Herc, Drae
param
(
[string] $EnvironmentName,
[string] $Version,
[string] $ProjectName,
[string] $OctopusApiKey,
[string] $OctopusServerUrl,
[string] $ReleaseNotes
)