Skip to content

Instantly share code, notes, and snippets.

View priceflex's full-sized avatar

Steven Price priceflex

View GitHub Profile
@flakshack
flakshack / WUA_SearchDownloadInstall.vbs
Created July 16, 2014 15:50
Windows Update Randomizer
'#############################################################################
'# Procedure: WUA_SearchDownloadInstall.vbs
'# Author: Microsoft/Scott Vintinner
'# Last Edit: 07/14/2014
'# Purpose: This script will trigger a Windows Update on this computer
'# Notes: Must be run as administrator
'# Source: http://msdn.microsoft.com/en-us/library/aa387102%28VS.85%29.aspx
'#############################################################################
Option Explicit
Dim scriptShell, fs
@joefitzgerald
joefitzgerald / win-updates.ps1
Created December 31, 2013 23:18
Install All Windows Updates, Rebooting As Many Times As Required
param($global:RestartRequired=0,
$global:MoreUpdates=0,
$global:MaxCycles=10)
function Check-ContinueRestartOrEnd() {
$RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
$RegistryEntry = "InstallWindowsUpdates"
switch ($global:RestartRequired) {
0 {
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry
@modsaid
modsaid / add-copyright.rb
Last active May 25, 2016 02:56
This ruby scripts add the prepends the specified arbitrary text (e.g copyright notice) to all .rb files under a given directory
@priceflex
priceflex / gist:2633211
Created May 8, 2012 07:06
A nice way to organize your spec_helper file
ENV["RAILS_ENV"] ||= 'test'
# begin
# require 'rubygems'
# require 'spork'
# rescue LoadError => e
# end
def load_all(*patterns)
patterns.each { |pattern| Dir[pattern].sort.each { |path| load File.expand_path(path) } }