Skip to content

Instantly share code, notes, and snippets.

@williamjacksn
williamjacksn / id_rsa.pub
Created December 4, 2014 14:52
Public Key
AAAAB3NzaC1yc2EAAAADAQABAAABAQDQfTQkueWvR2aBWqnH4HU1HWf6qJrbGnzB026YgwTBT9nzhyVpckEi2ko22rBgZ89rKBoqJLbB3cogH0qHLVNbiUcJel+YfjI3XmTV9EtnuO8HXtinkTQHI1IlgWwlUpYaQFME1I13eqgxFnvr9aUCzac9c0J5zGwD+2vj1MMlf/uxXNoX1hYO13JdUMBzD2mRyaEwdxLbfpQCzTEseh8LV+41lyPKs2FK6V8c+IA6Uh40mfzwyHiSl+hMT3Ee02mubiVEmzFpy8MKisMRt/solHTKRMoZG3CfOHYRwBMn1XgrTBLZ+UGdz0tqnvi0Dp2YCEfWLMd/Go8kCh5kjyeb
@williamjacksn
williamjacksn / flash-player-plugin-version.vbs
Created February 3, 2014 19:06
Display Flash Player Plugin version
Set wi = CreateObject("WindowsInstaller.Installer")
For Each p In wi.Products
n = wi.ProductInfo(p, "ProductName")
If InStr(n, "Adobe Flash Player") > 0 Then
If InStr(n, "Plugin") > 0 Then
WScript.Echo wi.ProductInfo(p, "VersionString")
Exit For
End If
End If
Next
@williamjacksn
williamjacksn / cm-version.vbs
Created February 3, 2014 17:54
Display Configuration Manager Client version
For Each c In GetObject("winmgmts:root/ccm").InstancesOf("CCM_InstalledComponent")
If c.Name = "CcmFramework" Then
WScript.Echo c.Version
End If
Next
@williamjacksn
williamjacksn / install-microsoft-updates.vbs
Last active January 2, 2016 16:18
Install Microsoft Updates. Skip Language Packs, Internet Explorer, and Bing.
' Install Microsoft Updates. Skip Language Packs, Internet Explorer, and Bing.
Option Explicit
Dim debug, dry_run, task_sequence, arg
debug = False
dry_run = False
task_sequence = False
For Each arg In WScript.Arguments
@williamjacksn
williamjacksn / README.md
Last active December 27, 2015 04:29
Email daily calendar
WITH
rated_songs AS (
SELECT song_rating_id
FROM rw_songratings
WHERE user_id = %s),
unrated_songs AS (
SELECT song_id, album_id, song_available, song_releasetime
FROM rw_songs
WHERE song_verified AND sid = %s AND song_rating_id NOT IN (
@williamjacksn
williamjacksn / install-jdk-with-jre.bat
Last active December 15, 2015 14:09
Install 32-bit Java Development Kit and Java Runtime Environment on 32- or 64-bit Windows.
msiexec.exe /package "%~dp0jdk1.7.0_17.msi" /quiet /norestart
goto [%PROCESSOR_ARCHITECTURE%]
goto end
:[x86]
msiexec.exe /package "%ProgramFiles%\Java\jdk1.7.0_17\jre.msi" /quiet /norestart
goto end
:[AMD64]
@williamjacksn
williamjacksn / firefox-detect-esr.vbs
Last active December 10, 2015 21:28
Update the Firefox DisplayName in the Add/Remove Programs list to indicate whether Firefox is on the "esr" release channel.
' This script will try to detect what update channel Firefox is using. If the
' update channel is "esr" then the DisplayName in the Add/Remove Programs list
' will be updated to inclued an "[esr]" tag at the end.
' If the update channel is "release" and there is an "[esr]" tag in the
' DisplayName, the tag will be removed.
' by William Jackson (w@utexas.edu)
Set shell = WScript.CreateObject("WScript.Shell")
@williamjacksn
williamjacksn / gpo-backup-script.ps1
Created September 12, 2012 16:44
Backup all GPOs that match a pattern
Import-Module GroupPolicy
Get-GPO -All | Where-Object {$_.DisplayName -like "ops*"} | Backup-GPO -Path "\\server\share" -Comment "Backup Comment"
#!/bin/bash
crontab -l | grep -v "no crontab for" | grep -v "freshclam" | grep -v "clamscan" > /tmp/crontmp
crontab /tmp/crontmp
rm /tmp/crontmp
find /Users ( -name "uk.co.markallan.clamxav.clamscan.plist" -or -name "uk.co.markallan.clamxav.freshclam.plist" ) -execdir launchctl unload -w "{}" \;
find /Users -name "uk.co.markallan.clamxav.*" -delete
rm -r /Library/Receipts/clamav*
rm -r /Library/Receipts/ClamAV*
rm -r /usr/local/clamXav