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
@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
Mono: gc took 93 usecs
Mono: Assembly Loader probing location: '/opt/local/lib/mono/4.0/mscorlib.dll'.
Mono: Image addref mscorlib[0x7faa50c0cf50] -> /opt/local/lib/mono/4.0/mscorlib.dll[0x7faa51009400]: 2
Mono: AOT failed to load AOT module /opt/local/lib/mono/4.0/mscorlib.dll.dylib: dlopen(/opt/local/lib/mono/4.0/mscorlib.dll.dylib, 9): image not found
Mono: Assembly Loader loaded assembly from location: '/opt/local/lib/mono/4.0/mscorlib.dll'.
Mono: Config attempting to parse: '/opt/local/lib/mono/4.0/mscorlib.dll.config'.
Mono: Config attempting to parse: '/opt/local/lib/../etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono: Assembly mscorlib[0x7faa50c0cf50] added to domain GitExtensions.exe, ref_count=1
Mono: Config attempting to parse: '/opt/local/lib/../etc/mono/config'.
@timabell
timabell / logcommand.sh
Created March 22, 2013 23:10
quick thing for logging what you've done on the console. needs exec bit. then run with "./logcommand.sh somecommand -args ..."
#!/bin/sh
echo >> testing.txt
echo "\$ $*" >> testing.txt
$* 2>&1 | tee -a testing.txt
echo >> testing.txt
@timabell
timabell / htmlizer.rb
Last active December 18, 2015 02:49
Markdown (md) to html script. One-off.
#!/usr/bin/env ruby
# https://gist.github.com/timabell/5714231
require 'redcarpet'
require 'rb-inotify'
@filename=ARGV[0]
if !@filename
puts 'specify filename'
exit 1
end
@timabell
timabell / blacklist_5139
Created July 30, 2013 07:56
blacklist the kernel module that's spamming my logs on my samsung
# cat /etc/modprobe.d/blacklist_5139
# usb card reader, spamming dmesg with
# "xhci_queue_intr_tx: 76 callbacks suppressed"
# ref https://www.linuxquestions.org/questions/slackware-14/hci_queue_intr_tx-callbacks-suppressed-4175467718/#post4980647
blacklist rts5139
@timabell
timabell / Gemfile.local
Last active December 21, 2015 00:19 — forked from gma/Gemfile.local
group :development do
gem 'debugger'
gem 'spring'
end
group :test do
gem 'minitest', '4.3.0'
gem 'tconsole', '1.2.8'
end
// list services defined in fixture data
var fs = require('fs');
var files = fs.readdirSync('.').filter(function(c){return c.match(/\.json$/)});
files.forEach(function(json) {
console.log('File: ' + json);
var country = require('./' + json);
if (!country.results) {
console.log(" - No data");
console.log();
return;
@timabell
timabell / ap_tester.sh
Created October 14, 2013 17:21
See the ping times for all the access points with a single ssid.
#!/bin/sh
SSID=$1
echo Checking access points for ssid $SSID ...
AP_LIST=`sudo iwlist wlan0 scan essid $SSID | grep "Address" | awk '{print $5}'`
echo Found access points:
echo $AP_LIST
for ap in $AP_LIST
do
echo Connecting to $ap ...
sudo wpa_cli -i wlan0 bssid 0 $ap
@timabell
timabell / ap-watch.sh
Last active December 25, 2015 12:49
Tools for troubleshooting wireless problems. * log access point in use * monitor access point changes * scan and test all access points
sudo watch -d -n 10 'wpa_cli -i wlan0 status | sed -n "s/.*bssid=\(.*\).*/\1/gp"'
@timabell
timabell / git-poll
Last active June 1, 2016 08:57
poll git servers for new commits
#!/bin/sh
# https://gist.github.com/timabell/6990292
title "git poll - `pwd`"
while true
do
date
echo "Polling git servers..."
git fetch --all
echo "Sleeping."
sleep 1800 # half hourly