- Health check template:
- Goodreads reading list:
- Feature factory:
- https://cutle.fish/blog/12-signs-youre-working-in-a-feature-factory
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
export PATH=/usr/local/go:/Users/adrian/go/bin/:$PATH | |
export PATH=/usr/local/bin/:$PATH | |
export PATH="$PATH:/Users/adrian/.dotnet/tools" | |
# Set the prompt. | |
NT_PROMPT_SYMBOL=❱ | |
function precmd(){ | |
autoload -U add-zsh-hook | |
setopt prompt_subst |
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
" Plugins used | |
" Install vim-plug. | |
" https://github.com/junegunn/vim-plug | |
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
" Install dependencies. | |
" python3 -m pip install --user --upgrade pynvim | |
" python -m pip install --user --upgrade pynvim | |
" :PlugInstall |
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
func DisableCachingAndSniffing(next http.Handler) http.Handler { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate;") | |
w.Header().Set("pragma", "no-cache") | |
w.Header().Set("X-Content-Type-Options", "nosniff") | |
next.ServeHTTP(w, r) | |
}) | |
} |
Serverless to HTTP Handler:
Password hashing:
Encrypted cookies:
OAuth2 library:
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
{"lightId":"1","states":[true,true,true,true,true]} |
I hereby claim:
- I am a-h on github.
- I am adrianhesketh (https://keybase.io/adrianhesketh) on keybase.
- I have a public key whose fingerprint is 0227 7F96 9055 ACF7 36CE 8954 9E01 3872 2232 3123
To claim this, I am signing this object:
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
#include <U8x8lib.h> | |
U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/15, /* data=*/4, /* reset=*/16); | |
// Timer setup. | |
volatile int interruptCounter; | |
volatile int totalInterruptCounter; | |
hw_timer_t *timer = NULL; | |
portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED; |
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
var path = require('path'); | |
const redirects = { | |
"/about-us": { to: "/about", statusCode: 301 }, | |
"/contact-us/head-office": { to: "/contact/head-office", statusCode: 302 }, | |
}; | |
exports.handler = async event => { | |
const { request } = event.Records[0].cf; | |
const normalisedUri = normalise(request.uri); |
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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Sets up the required resources for the website at example.com | |
Parameters: | |
DomainName: | |
Type: String | |
Description: The website domain name. | |
Default: example.co.uk | |
RedirectTo: | |
Type: String |