Skip to content

Instantly share code, notes, and snippets.

@wes-goulet
wes-goulet / _vimrc
Created March 31, 2016 20:44
My goto vim profile
set shiftwidth=4 softtabstop=4
set expandtab
set incsearch ignorecase hlsearch
colorscheme elflord
set number
syntax on
set backspace=indent,eol,start
set cindent
@wes-goulet
wes-goulet / settings.json
Last active December 22, 2021 19:52
VS Code user settings
{
"files.trimTrailingWhitespace": true,
"editor.renderWhitespace": "all",
"editor.trimAutoWhitespace": true,
"editor.formatOnSave": true,
"editor.rulers": [ 80 ],
"editor.minimap.enabled": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"explorer.compactFolders": false
}
@wes-goulet
wes-goulet / .bash_aliases
Last active December 22, 2021 19:51
aliases for bash on windows
alias gs='git status'
alias ga='git add --all'
alias gf='git fetch --all --prune'
alias gsu='git submodule sync && git submodule update --init --recursive'
alias repos='cd ~/Source/Repos'
alias sln='start *.sln'
alias startssh='eval `ssh-agent -s` && ssh-add ~/.ssh/id_rsa'
alias gt='echo Fetch then show local tags: && git fetch --tags && git tag -l --sort=v:refname'
alias gtu='echo Fetch upstream then show local tags: && git fetch --tags upstream && git tag -l --sort=v:refname'
alias grt='echo Remote Tags: && git ls-remote --tags | sort -t '"'"'/'"'"' -k 3 -V | awk '"'"'{print $2}'"'"' | grep -v "{}"'
@wes-goulet
wes-goulet / bootstrap_dev_machine.ps1
Last active July 17, 2018 04:50
powershell commands to run when setting up new windows dev environment
# if you want to run this as a script then you have to make sure
# you've enabled RemoteSigned scripts with:
# Set-ExecutionPolicy RemoteSigned
# To run this script do the following:
# iwr https://gist.githubusercontent.com/wes566/dd90579b6261fc9a1da92857cdbc910e/raw/bootstrap_dev_machine.ps1 -UseBasicParsing | iex
#install chocolatey
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
@wes-goulet
wes-goulet / profile.ps1
Created May 22, 2017 20:57
Powershell profile to add some git aliases
$env:PATH += ";C:\Program Files\Git\mingw64\bin"
function Invoke-GitFetchAll
{
& git.exe fetch --all
}
function Invoke-GitStatus
{
& git.exe status
/// <summary>
/// Provides a way to override the current <see cref="implementation"/>.
/// </summary>
/// <param name="valueFactory">Factory that creates the new implementation</param>
/// <param name="implementation">Reference to the current implementation, it will be
/// updated with the new <see cref="valueFactory"/>.</param>
/// <param name="lazyLoad">Set to true if you want to lazy load your new implementation
/// (not recommended if your implementation listens for events in it's constructor).</param>
public static void OverrideDefault<TInterface>(Func<TInterface> valueFactory, ref Lazy<TInterface> implementation, bool lazyLoad = false)
{
@wes-goulet
wes-goulet / ConvertAllSvgsToPdf.sh
Created November 9, 2017 18:45
Converts all .svg files to .pdf files using Inkscape in the current directory
#! /usr/bin/env bash
svgFiles=$(ls -d -1 $PWD/*.svg)
for file in $svgFiles
do
pdfName=${file/".svg"/".pdf"}
echo "Converting $file to $pdfName"
/Applications/Inkscape.app/Contents/Resources/bin/inkscape --without-gui --file=$file --export-pdf=$pdfName
done
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# you must install bash completion with "brew install bash-completion"
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
set completion-ignore-case On
@wes-goulet
wes-goulet / keybindings.json
Last active January 3, 2022 18:05
VS Code custom key bindings for MacOS
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "shift+cmd+s",
"command": "workbench.action.files.saveAll"
},
{
"key": "shift+cmd+s",
"command": "-workbench.action.files.saveAs"
},