Skip to content

Instantly share code, notes, and snippets.

View NickCrew's full-sized avatar

Nick Ferguson NickCrew

View GitHub Profile
@NickCrew
NickCrew / install-dots.sh
Created July 30, 2021 15:22
Install dots
#!/usr/bin/env bash
set -e
function cfg {
git --work-tree=$HOME --git-dir=$HOME/.cfg $@
}
git clone --bare https://github.com/NickCrew/dotfiles.git $HOME/.cfg
mkdir -p .config-backup
cfg checkout
@NickCrew
NickCrew / get-latest-github-release.sh
Created July 4, 2021 16:34
Get latest github release
#!/usr/bin/env bash
set -e
if [[ "$#" != "2" ]]; then
echo "USAGE:"
echo "get-latest-github-release.sh <user> <repo> [file extension] [outfile]"
exit 1
fi
repo="${1}/${2}"
@NickCrew
NickCrew / settings.vim
Created April 8, 2021 17:44
Surfingkeys Settings
// an example to create a new mapping `ctrl-y`
mapkey('<Ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
map('gt', 'T');
// an example to remove mapkey `Ctrl-i`
unmap('<Ctrl-i>');
@NickCrew
NickCrew / Microsoft.PowerShell_profile.ps1
Created March 9, 2021 22:29
PowerShell Profile (CurrentUserCurrentHost)
# ####################################################
#
# Name: Microsoft.PowerShell_profile.ps1
# Profile: CurrentUserCurrentHost
# PSVersion: 7
#
# Profile Load Order:
# - AllUsersAllHosts
# - AllUsersCurrentHost
# - CurrentUserAllHosts
@NickCrew
NickCrew / profile.ps1
Created March 9, 2021 22:28
PowerShell Profile (CurrentUserAllHosts)
# #####################################################
#
# Name: profile.ps1
# Profile: CurrentUserAllHosts
# PSVersion: 7
#
# Profile Load Order:
# - AllUsersAllHosts
# - AllUsersCurrentHost
# - CurrentUserAllHosts
@NickCrew
NickCrew / 40-wifi.yaml
Created January 18, 2021 20:42
Netplan config for wifi
network:
version: 2
wifis:
wlan0:
optional: true
access-points:
"piggah2":
password: "passwordhere"
dhcp4: true
@NickCrew
NickCrew / settings.json
Last active October 22, 2020 01:19
Windows Terminal Settings
// This file was initially generated by Windows Terminal Preview 1.2.2022.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@NickCrew
NickCrew / _vsvimrc
Last active October 22, 2020 01:19
vsvimrc
" Settings
set backspace=2
set clipboard=unnamed " Use system clipboard
set autoindent
set tabstop=4
set shiftwidth=4
set expandtab
set incsearch
set showcmd
set hlsearch
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "PowerShell Launch Script",
"type": "PowerShell",
"request": "launch",
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks",