Skip to content

Instantly share code, notes, and snippets.

Chestnut Soup Recipe
2lbs chestnuts
2oz butter
1onion chopped
4 rashers streaky bacon
2 carrots chopped
2 sticks celery chopped
1 bunch water cress
1/2 pint stock
@-moz-document domain("discordapp.com") {
div[class^="markup"] {
font-size: 5.9375rem
}
strong[class^="username"] {
font-size: 5rem
}
time[class^="timestamp"] {
font-size: 5rem
}
Get-ChildItem HKCU:\Software\SimonTatham\PuTTY\Sessions\ | %{
Set-ItemProperty -path $_.pspath -name "Colour0" -value "131,148,150"
Set-ItemProperty -path $_.pspath -name "Colour1" -value "147,161,161"
Set-ItemProperty -path $_.pspath -name "Colour2" -value "0,43,54"
Set-ItemProperty -path $_.pspath -name "Colour3" -value "7,54,66"
Set-ItemProperty -path $_.pspath -name "Colour4" -value "0,43,54"
Set-ItemProperty -path $_.pspath -name "Colour5" -value "238,232,213"
Set-ItemProperty -path $_.pspath -name "Colour6" -value "7,54,66"
Set-ItemProperty -path $_.pspath -name "Colour7" -value "0,43,54"
Set-ItemProperty -path $_.pspath -name "Colour8" -value "220,50,47"

Keybase proof

I hereby claim:

  • I am rycuda on github.
  • I am rycuda (https://keybase.io/rycuda) on keybase.
  • I have a public key ASBjDvrQwY6WwZvoXlEjcwUExCBIryjfvYdskUXqNMgwrAo

To claim this, I am signing this object:

@rycuda
rycuda / passgen.ps1
Created December 15, 2015 17:04
Powershell xkcdesq password generation
function Insert-Value {
param(
[parameter(ValueFromPipeline=$true)][System.Object[]]$array,
[int]$position,
$value
)
end{
$upper = ($input.GetUpperBound(0))
if ( $position -eq 0 )
{ return @($value) + $input }
@rycuda
rycuda / beef, beer and chorizo stew.txt
Created October 30, 2015 14:01
Beef, beer and chorizo stew
550g ish of beef shin,
whole chorizo link 225g there abouts,
three large carrots,
two large parsnips,
two fist sized turnips,
one of those half swedes that s'bries and tesco do,
bag of smallish new spuds 750g (ish),
two medium-large leeks,
couple of big onions,
200g bag of kale,
@rycuda
rycuda / recurse-ADmembership.ps1
Last active December 18, 2015 14:39
Powershell snippet to recurse AD group membership, returning a complete list of users.
function recurse-ADmembership {
param(
[parameter(ValueFromPipeline=$true)][Microsoft.ActiveDirectory.Management.ADGroup]$group,
[Alias('groups')][hashtable]$_expandedgroups=@{}
)
process{
$group | get-adgroupmember | foreach-object {
if (($_.objectclass -eq 'group') -and (-not $_expandedgroups.ContainsKey($_.DistinguishedName))) {
$_ | recurse-ADmembership -groups $_expandedgroups
$_expandedgroups.add($_.DistinguishedName,$true)
@rycuda
rycuda / ninitecheck.ps1
Created October 22, 2015 11:27
Powershell snippet to check ninite for application update status
$applications =@();
if ($true) {
$_status, $_appstatus = cmd /c .\niniteone.exe /audit /silent . ;
if (-not ($status -like 'Failed*')) {
while ($_appstatus) {
$_item, $_appstatus = $_appstatus ;
$_name, $_status = $_item.split(':');
$_application = new-object -typename psobject -prop (@{'name' = $_name; 'status' = $_status.trim()}) ;
$applications += ,$_application;
@rycuda
rycuda / AD Staleness check.ps1
Created October 5, 2015 10:39
Powershell to spit out stale (enabled) users and stale computers.
Search-ADAccount -ComputersOnly -AccountInactive -timespan 30.00:00:00 | sort name | ft name,distinguishedname
Search-ADAccount -UsersOnly -AccountInactive -timespan 30.00:00:00 | Get-ADUser | Where-Object {$_.enabled} | sort name | ft name,distinguishedname
@rycuda
rycuda / WSUS Health Check.ps1
Last active October 5, 2015 10:36
Powershell to check that all computers in AD are registered in WSUS
$WSUSServer = "server name"
$WSUSPort = 8530
Connect-PoshWSUSServer $WSUSServer -port $WSUSPort
$WSUSClients = (Get-PoshWSUSClient).fulldomainname
(Get-ADComputer -Filter *).dnshostname | ForEach-Object {if (-not ($WSUSClients -contains $_)) {$_}} | sort