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 / profile.ps1
Last active May 1, 2018 08:17
my powershell customisations
# customized per-user profile
# https://gist.github.com/timabell/56254968905f9066ef88c1ae774a53d1
# don't forget to start a new powershell after editing this
# useful things:
# install https://github.com/neilpa/cmd-colors-solarized
# regedit /s solarized-light.reg
# install https://github.com/dahlbyk/posh-git
# Install-Module posh-git # requires PSGet
@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(
@tvararu
tvararu / bat.yml
Created August 13, 2019 08:45
Tmuxinator config for Becoming a Teacher
name: bat
# Project hooks
# Runs on project start, always
# on_project_start: command
# Run on project start, the first time
# on_project_first_start: command
# Run on project start, after the first time
# on_project_restart: command
# Run on project exit ( detaching from tmux session )
@tvararu
tvararu / heresy.c
Created September 10, 2019 13:08
//
// Compile with:
// gcc -std=c99 heresy.c
//
// Run with:
// ./a.out
//
// It outputs:
// 0
//
@timabell
timabell / boxstarter.ps1
Last active November 6, 2020 18:29
http://boxstarter.org/ script for .net development in a vm - run it by clicking here: https://is.gd/Zt6ziH
# boxstarter script http://boxstarter.org/
# source: https://gist.github.com/timabell/608fb680bfc920f372ac
# originally tested on win7 x64
# wip on win 10
# dotmatrix (windows branch) https://github.com/timabell/dotmatrix/tree/windows
# powershell profile https://gist.github.com/timabell/56254968905f9066ef88c1ae774a53d1
# This is a start of a build of a box I'm using at the moment.
# Fork this to your own gist, then comment/uncomment/add stuff to suit you.
@Zonciu
Zonciu / usersecrets.ps1
Last active December 27, 2020 15:10
Manage User Secrets for .NET Core console application
<#
.NOTES
How to use: Open Visual Studio, go to Tools – External Tools to bring up the External Tools dialog, add a new tools menu with the following configuration:
Title: Manage User Secrets (Or whatever you want)
Command: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe (Path to powershell.exe)
Arguments: Path-to-this-script(e.g. D:\VisualStudioTools\usersecrets.ps1)
Initial Directory: $(ProjectDir)
.PARAMETER ProjectFilePath
The csproj file's path, or keep it empty to search *.csproj file in initial directory
@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 ..
@timabell
timabell / extended_attributes.sql
Created October 6, 2016 09:35
source-controllable self-enforcing extended attribute list for sql server
-- Permanent copy of schema extended properties
-- In a format suitable for easy source control and hand-editing.
-- All the properties are prefixed and only those will be added/updated/deleted by this script
-- At the bottom you'll find a commented-out `select` for generating the
-- insert block from an existing schema's extended properties.

Notes about tools for measuring and learning about performance.

Tools that can be used

Name + Link Usecase
Google Pagespeed Insights (PSI) Measuring load and render performance, highlighting basic responsive design issues
What does my site cost Measuring how much the payload of a website costs in different countries
Webpagetest Measuring load and render performance, with comprehensive video and waterfall charts, on a choice of devices and connection speeds
Google Lighthouse ("Audits" tab in Chrome Devtools) Measuring load and render performance, and some basic best practice, PWA, and accessibility criteria