Skip to content

Instantly share code, notes, and snippets.

View RC1140's full-sized avatar
🎿
NOP Sledding

Jameel RC1140

🎿
NOP Sledding
View GitHub Profile
[string](new-object System.Net.WebClient).DownloadString("http://api.stackoverflow.com/0.8/Users/42069?type=jsontext")
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."+ $_+ "'") }}
$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match "Software Name"
}
$app.Uninstall()
[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)
#!/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:
Param($Param1,$Param2)
switch ($Param2)
{
"dev" {$searchPath = "C:\Development\"}
"prod" {$searchPath = "C:\Development\Prod"}
"test" {$searchPath = "C:\Development\Testing"}
default {$searchPath = "C:\Development\"}
}
du -s * |awk '{if ($1/1024 > 2000 ) print $1/1024 " " $2 " " $3 " " $4}'
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() {