Skip to content

Instantly share code, notes, and snippets.

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
# 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"
" 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
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
}
#!/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
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
mkdir project-name
cd project-name
dotnet new aurelia
dotnet restore
npm install
export ASPNETCORE_ENVIRONMENT=Development
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]
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
@NRKirby
NRKirby / git_remote_from_bash.txt
Last active March 1, 2017 08:13
Open Git remote from command line
[alias]
open = !explorer `git config remote.origin.url`
browse = !git open