Skip to content

Instantly share code, notes, and snippets.

View agtcooke's full-sized avatar
🏠
Working from home

Tony Cooke agtcooke

🏠
Working from home
View GitHub Profile
@agtcooke
agtcooke / packageReference.md
Created October 25, 2018 12:43
Migrate Projects to `PackageReference`
@agtcooke
agtcooke / sql-in-docker.md
Created August 28, 2018 19:19
sql-in-docker.md

Run SQL Server in docker:

  1. Install docker

  2. Run: docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<your sa password>' -p 1433:1433 --name local_sql_server -d microsoft/mssql-server-linux:2017-latest

  3. Where needed, your connection string will be:

`Data Source=(local);Initial Catalog=NotificationService;User Id=SA;Password=<your sa password>;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;integrated security=false;`
@agtcooke
agtcooke / kill_port.bat
Created May 22, 2018 15:02
kill_port.bat
@echo off
for /f "tokens=5" %%a in ('netstat -aon ^| findstr %1 ^| findstr LISTENING') do taskkill /pid %%a /f && echo killed PID %%a
@agtcooke
agtcooke / .bashrc
Created May 22, 2018 15:00
tony's bashrc
# If not running interactively, don't do anything
[[ "$-" != *i* ]] && return
# Aliases
alias ls="ls -l --color"
alias clear='printf "\033c"'
alias cls="clear"
alias kp8080="~/kill_port.bat 8080"
alias kp="~/kill_port.bat"
@agtcooke
agtcooke / .gitconfig
Created May 22, 2018 14:58
tony's .gitconfig
[user]
email = [email protected]
name = Tony Cooke
[push]
default = simple
[diff]
tool = bcomp
[difftool]
prompt = false