Skip to content

Instantly share code, notes, and snippets.

View timabell's full-sized avatar
🍵
418 I'm a teapot

Tim Abell timabell

🍵
418 I'm a teapot
View GitHub Profile
@mbostock
mbostock / .block
Last active March 1, 2024 06:07
The Gist to Clone All Gists
license: gpl-3.0
@timabell
timabell / README.md
Created July 23, 2012 15:40
Set of batch & sql scripts for rebuilding a sql server db. Start at rebuild*.bat & upgrade-live.bat

We've created a set of good old fashioned windows batch scripts which tie together the process of completely rebuilding test systems and their databases. This gives us confidence that when we eventually upgrade a live web system that all the pieces of the upgrade have been well tested. The scripts will take an ASP.NET website offline, upgrade it (code and database) and put it back online all in one script. They can be run with or without a continuous integration server.

You can find the files here: https://gist.github.com/3164291

To rebuild a local development system run rebuild.bat, to rebuild a QA system run rebuild-QA.bat which overrides some of the values in the main rebuild file.

Some more details:

  • The scripts must be run in a "Visual Studio Command Prompt" for the code build & deployment to work.
  • The program relies on SqlHawk to do the database upgrade which must be available on the path.
  • You can set environment variables at the command prompt to alter settings without altering
@jstangroome
jstangroome / Deploy-SSRSProject.ps1
Created July 3, 2012 22:37
PowerShell scripts to deploy a SQL Server Reporting Services project (*.rptproj) to a Reporting Server
#requires -version 2.0
[CmdletBinding()]
param (
[parameter(Mandatory=$true)]
[ValidatePattern('\.rptproj$')]
[ValidateScript({ Test-Path -PathType Leaf -Path $_ })]
[string]
$Path,
[parameter(
@timabell
timabell / git-many
Last active June 21, 2021 16:18
deal with multiple git repositories
#!/bin/bash
# refs http://tim.theenchanter.com/2008/06/garbage-collect-every-git-repository-on.html
# This script hosted at https://gist.github.com/1391205
echo "Searching..."
find -L . -maxdepth 3 -type d -name .git | while read dir;
do
pushd "$dir" > /dev/null
cd ..
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))