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
[string](new-object System.Net.WebClient).DownloadString("http://api.stackoverflow.com/0.8/Users/42069?type=jsontext") |
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
gwmi -query "select * from win32_pingstatus where Address='192.168.0.1'" | |
#{1..254 | %{ gwmi -query ("select * from win32_pingstatus where Address='192.168.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
$app = Get-WmiObject -Class Win32_Product | Where-Object { | |
$_.Name -match "Software Name" | |
} | |
$app.Uninstall() |
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
[Reflection.Assembly]::LoadFile("c:\temp\agsXMPP.dll") | |
$clientConnection = new-object agsXMPP.XmppClientConnection | |
$clientConnection.Server = "gmail.com" | |
$clientConnection.ConnectServer = "talk.google.com" | |
$clientConnection.Open("EnterYourUserNameHere","EnterYourPasswordHere") | |
$message = new-object agsXMPP.protocol.client.Message("Who do you want to send the message to ","Errr is this thing on") | |
$clientConnection.Send($message) |
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
#!/usr/bin/env python | |
import socket | |
import struct | |
def wake_on_lan(macaddress): | |
""" Switches on remote computers using WOL. """ | |
# Check macaddress format and try to compensate. | |
if len(macaddress) == 12: |
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
Param($Param1,$Param2) | |
switch ($Param2) | |
{ | |
"dev" {$searchPath = "C:\Development\"} | |
"prod" {$searchPath = "C:\Development\Prod"} | |
"test" {$searchPath = "C:\Development\Testing"} | |
default {$searchPath = "C:\Development\"} | |
} |
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
du -s * |awk '{if ($1/1024 > 2000 ) print $1/1024 " " $2 " " $3 " " $4}' |
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
eval(function(p, a, c, k, e, r) { | |
e = function(c) { | |
return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) | |
}; | |
if (!''.replace(/^/, String)) { | |
while (c--) r[e(c)] = k[c] || e(c); | |
k = [function(e) { | |
return r[e] | |
}]; | |
e = function() { |
NewerOlder