Skip to content

Instantly share code, notes, and snippets.

View matt40k's full-sized avatar

Matt Smith matt40k

View GitHub Profile
@matt40k
matt40k / UpdateS3AgentDS
Created May 28, 2015 14:01
Updates your SOLUS3 Agent config with the new Deployment server
''
' Name: UpdateS3AgentDS.vbs
'
' Description:
' Updates your SOLUS3 Agent config with the new Deployment server
'
' Version: 1.1
'
' Usage: UpdateS3AgentDS.vbs <oldservername> <newservername>
'
@matt40k
matt40k / transfer_login
Created May 28, 2015 14:03
Transfer SQL logins from Master to the local db
EXEC sims.db_p_transfer_login
@matt40k
matt40k / Output-SVN-Log
Created May 28, 2015 14:10
Export the SVN log to XML file
svn log -v --xml >> log.xml
@matt40k
matt40k / Build_Script
Created May 28, 2015 16:29
I've got a some large stored procedures that I've split up into separate files within a subfolder, this script combines them into a single file
$dir = 'C:\svn\SQL'
$dirs = Get-ChildItem -Path $dir –Directory
Foreach ($dir in $dirs) {
$files = Get-ChildItem $dir.FullName -Filter *.sql
Foreach ($file in $files) {
$combinedFile = $combinedFile + (Get-Content $file.FullName)
}
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"EstablishmentName": "Houldsworth Valley Primary School",
"DfENumber": 937023
},
"geometry": {
@matt40k
matt40k / StartSQLServices
Created May 29, 2015 19:59
On my dev machine I only start the SQL Server services just before I start developing, no point wasting resources ;) - this script just makes it easier to start them all up
###
# Start MS-SQL Services
#
# By default I've stopped the MS-SQL servers for performance reasons, if you're
# not going to use it, don't run it. If you do. Run the script first :)
#
###
# Needs to run as administrator
# code from: http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/09/23/a-self-elevating-powershell-script.aspx
@matt40k
matt40k / SQL2012Dev_ConfigurationFile.ini
Created May 29, 2015 20:03
A configuration file for install SQL 2012 developer
;SQL Server 2012 Configuration File
[OPTIONS]
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Required to acknowledge acceptance of the license terms.
@matt40k
matt40k / MythicBeasts-DNSAPI
Created May 29, 2015 22:24
PowerShell script for using mythic-beasts.com DNS API - https://www.mythic-beasts.com/support/api/primary
$ipv4 = 'https://dnsapi4.mythic-beasts.com/'
$ipv6 = 'https://dnsapi6.mythic-beasts.com/'
$password = 'password'
$domain = 'mythic-beasts.com'
$command = 'LIST'
$header = @{"Content-Type"="application/x-www-form-urlencoded"}
$body = @{domain=$domain;password = $password;command=$command;}
$r = Invoke-WebRequest -URI $ipv4 -Method POST -Headers $header -Body $body
@matt40k
matt40k / GetInstalledApps
Created May 31, 2015 07:17
Lists all the installed applications on local machine
Get-WmiObject -Class Win32_Product | Select-Object -Property Name
@matt40k
matt40k / Toshiba_Default_Install
Last active August 29, 2015 14:22
List of applications installed by default on a out-of-the-box Toshiba laptop
Name
----
Microsoft Office
Microsoft .NET Framework 4.5
TOSHIBA TEMPRO
WinZip 18.5
Microsoft Visual C++ 2010 x64 Redistributable - 10.0.40219
Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219
DTS Sound
TOSHIBA Flash Cards