Skip to content

Instantly share code, notes, and snippets.

@mattstratton
mattstratton / .profile
Created January 18, 2013 17:55
Matt's prompt config for git stuff
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOUR="\[\033[0m\]"
PS1="$GREEN\u@machine$NO_COLOUR:\w$YELLOW\$(parse_git_branch)$NO_COLOUR\$ "
@mattstratton
mattstratton / leankit.ps1
Last active December 11, 2015 23:19
PowerShell to grab LeanKit changes and put into a PowerShell object
$j = Invoke-WebRequest -Uri http://aptstechops.leankitkanban.com/Kanban/Api/Board/34843018/BoardVersion/794/GetBoardHistorySince -Headers @{"Authorization" = "BASIC YXB0YWRtaW5zQGNsYXNzaWZpZWR2ZW50dXJlcy5jb206MnYzQnB0bmRoTHJmWVQ="}
$j2 = $j | ConvertFrom-Json
$j2.ReplyData.Item | ForEach-Object -Process {if ($_.EventType -eq "CardCreationEvent") { Write-Host $_.EventType}}
@mattstratton
mattstratton / This is a test gist.txt
Created February 12, 2013 13:52
Test of Code Journal
Hello World
I am doing a gist because, well, I want to see how to use Code Journal.
@mattstratton
mattstratton / .bash_profile
Last active December 14, 2015 20:58
Matt's bash profile
export GITAWAREPROMPT=~/.bash/git-aware-prompt
source $GITAWAREPROMPT/main.sh
export PS1="\w\[$txtcyn\]\$git_branch\[$txtylw\]\$git_dirty\[$txtrst\]\$ "
#berk bash complection
# Set editor to sublime text
export EDITOR='subl -w'
export PATH=/usr/local/packer:$PATH
---
driver:
name: vagrant
provisioner:
name: chef_solo
platforms:
- name: win2k8r2
driver:
@mattstratton
mattstratton / gist:11051196
Created April 18, 2014 15:54
SQL Server Challenges
The biggest challenge with the SQL install is that is monolithic. We install it with Chef using windows_package. This provider uses the package name ( in the registry uninstall key) to determine whether SQL is installed. This means that you can't really change the installed components or features because chef just sees it as SQL server. This not only limits our ability to add or remove features later, it also limits chefs ability to control configuration drift.
The install is also huge, and we have to map to a file share to do the install (as opposed to http). The install over the network takes over 30 minutes, and times out sometimes. I'm not sure how much anyone can really do about that though. Again, if there were a way to make it more modular, you could at least potentially install smaller packages, though more of them (perhaps similar to the way IIS features are installed?)
I haven't even attempted a multi-instance or clustered setup...
There were some challenges with the reporting services con
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
cinst git.install
cinst git-credential-winstore
cinst GoogleChrome
cinst console-devel
cinst SublimeText3.app
cinst jivkok.SublimeText3.Packages
cinst putty
cinst poshgit
set -g prefix C-a
unbind C-b
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf
bind C-a send-prefix
bind | split-window -h
bind - split-window -v
bind h select-pane -L
:color solarized
set wrap
set textwidth=79
set formatoptions=qrn1
set colorcolumn=85
set shortmess=a
set cmdheight=2
@mattstratton
mattstratton / .kitchen.yml
Created July 8, 2014 16:18
kitchen yaml for testing the windoze
---
driver:
name: vagrant
provisioner:
name: chef_solo
platforms:
- name: windows-2012r2
driver_config: