Skip to content

Instantly share code, notes, and snippets.

View tvjames's full-sized avatar
🇦🇺

Thomas James tvjames

🇦🇺
View GitHub Profile
@larenelg
larenelg / README.md
Last active October 11, 2019 05:06
Brisbane Tech Meetup Code of Conduct

Script for organisers to say during the welcome / kickoff for a meetup:

"A reminder that this Meetup is a respectful community of professionals with a code of conduct. Our meetup's code of conduct is available on our Meetup page."

Brisbane Tech Meetup Code of Conduct

This meetup is dedicated to providing a respectful, harassment-free community for everyone. We do not tolerate harassment or bullying of any community member in any form. This does not only extend to members to local meetup communities, but to anyone who chooses to become involved in the larger meetup community of users, developers and integrators through events or interactions.

Harassment includes offensive verbal/electronic comments related to personal characteristics or choices, sexual images or comments in public or online spaces, deliberate intimidation, bullying, stalking, following, harassing photography or recording, sustained disruption of talks, IRC chats, electronic meetings, physical meetings or other events, inappropriate physi

@swlaschin
swlaschin / effective-fsharp.md
Last active June 16, 2024 18:41
Effective F#, tips and tricks

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
  • Keep IO at edges

@samsch
samsch / stop-using-jwts.md
Last active July 15, 2024 09:26
Stop using JWTs

Stop using JWTs!

TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.

If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)

A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/

The reason to avoid JWTs comes down to a couple different points:

  • The JWT specification is specifically designed only for very short-live tokens (~5 minute or less). Sessions
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 22, 2024 17:46 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@mihow
mihow / load_dotenv.sh
Last active July 19, 2024 19:44
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@parmentf
parmentf / GitCommitEmoji.md
Last active July 19, 2024 04:00
Git Commit message Emoji
@aembleton
aembleton / docx2md.md
Last active May 17, 2023 07:04 — forked from vdavez/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@prwhite
prwhite / Makefile
Last active July 16, 2024 02:14
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing

This is a work-in-progress script that automatically:

  1. Downloads the Tentacle MSI
  2. Installs it
  3. Installs and configures a Tentacle instance
  4. Registers the Tentacle with an Octopus server in "polling" mode

Remember to replace the settings at the bottom.

The script works great on EC2 as well. When creating a machine in EC2, paste the script between `` tags into the User Data section (in the EC2 management console, this is on the Configuration tab when creating a machine).