Skip to content

Instantly share code, notes, and snippets.

View calderhayes's full-sized avatar

Calder Hayes calderhayes

View GitHub Profile
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Calder Hayes
" Original Maintainer:
" Amir Salihefendic — @amix3k
"
" Awesome_version:
" Get this config, nice color schemes and lots of plugins!
"
" Install the awesome version from:
@calderhayes
calderhayes / safe-drop-dev-db.sql
Created July 19, 2017 16:03
To safely drop a development database, incase you are working with a PROD database with a user that has DROP permissions
USE master;
-- MS SQL SERVER
-- To safely drop a development database, incase you are working with a PROD database with a user that has DROP permissions
DECLARE @MyDevServerName NVARCHAR(255) = 'T1DTC075\LOCALDB'
DECLARE @MyDatabase NVARCHAR(255) = 'TestDB'
DECLARE @DropStatement NVARCHAR(500) = 'DROP DATABASE ' + @MyDatabase
IF @@SERVERNAME LIKE (@MyDevServerName + '%')
EXEC sp_executesql @DropStatement
# Place this script in Documents\deploy\
# Put source code into the deploy source folder
# Run the script with "powershell .\deploy.ps1"
Import-Module WebAdministration
Get-Content ".\config.ini" | foreach-object -begin {$h=@{}} -process { $k = [regex]::split($_,'='); if(($k[0].CompareTo("") -ne 0) -and ($k[0].StartsWith("[") -ne $True)) { $h.Add($k[0], $k[1]) } }
$environment = $h.Get_Item("Environment")
$siteName = $h.Get_Item("SiteName")
@calderhayes
calderhayes / .vimrc
Last active October 20, 2017 11:39
My .vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Calder Hayes
" Use this to get pathogen up quickly:
" mkdir -p ~/.vim/autoload ~/.vim/bundle && \
" curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Original Maintainer (I have modified from his 5.0 version):
" Amir Salihefendic
" http://amix.dk - amix@amix.dk