This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update -y; sudo apt upgrade -y | |
sudo apt install sshuttle -y | |
# https://tailscale.com/download/linux/rpi | |
curl -fsSL https://tailscale.com/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the script below to create aliases for Terraform & Rider. | |
# Location: $PSHOME | |
# | |
# Taken from: https://manjit28.medium.com/powershell-define-shortcut-alias-for-common-kubernetes-commands-1c006d68cce2 | |
# $ notepad $profile | |
Set-Alias -Name t -Value terraform | |
Set-Alias -Name rider -Value "<UserProfileLocation>\AppData\Local\JetBrains\Installations\Rider213\bin\rider64.exe" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Taken from: https://missing.csail.mit.edu/2020/editors/ | |
" Comments in Vimscript start with a `"`. | |
" If you open this file in Vim, it'll be syntax highlighted for you. | |
" Vim is based on Vi. Setting `nocompatible` switches from the default | |
" Vi-compatibility mode and enables useful Vim functionality. This | |
" configuration option turns out not to be necessary for the file named | |
" '~/.vimrc', because Vim automatically enters nocompatible mode if that file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
var pin1 = new GeoCoordinate(52.7062163, -2.7458003); | |
var pin2 = new GeoCoordinate(52.708034, -2.756104); | |
var distanceBetween = Math.Round(pin1.GetDistanceTo(pin2) / 1609.344, 1); // to miles, 1 dp | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Script for parsing and downloading a file containing jpg image URLs. | |
# | |
# Created to download images found in the README here: | |
# | |
# https://github.com/dconnolly/chromecast-backgrounds | |
# | |
# | |
# Pass the file to be parsed as a command line arg: | |
# $ py download_chromecase_images.py README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotnet new --install Microsoft.AspNetCore.SpaTemplates::* | |
mkdir project-name | |
cd project-name | |
dotnet new aurelia | |
dotnet restore | |
npm install | |
export ASPNETCORE_ENVIRONMENT=Development |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add upstream [url to the original repo] | |
git checkout [branch to be updated] | |
git fetch --all | |
git merge upstream/[branch to be updated] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker search --filter=stars=3 redis | |
# run echo command in alpine container & exit | |
docker run alpine echo "hello world!" | |
# run interactive | |
docker run -it alpine /bin/sh | |
# list all running containers | |
docker ps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
open = !explorer `git config remote.origin.url` | |
browse = !git open |
NewerOlder