Skip to content

Instantly share code, notes, and snippets.

View sjmf's full-sized avatar
🐝

Samantha Finnigan sjmf

🐝
View GitHub Profile
@sjmf
sjmf / ssh.remote.service
Created August 5, 2025 19:18
Systemd configuration for persistent ssh reverse tunnel
[Unit]
Description=SSH tunnel service SSH on local port 22 to 22000 on remote host
Wants=network-online.target
After=network-online.target
StartLimitIntervalSec=0
[Service]
User=tunnel
Group=tunnel
Type=simple
@sjmf
sjmf / filter.txt
Last active July 20, 2025 14:36
Procrastination domain blocklist
!
! Title: Procrastination Blocklist by @sjmf
! Description: List for blocking websites which cause procrastination
! Homepage: https://gist.github.com/sjmf/bf7debc15a07978edc70f3b903ad5241
! Last modified: 2024-03-13
!
! Uses the filter list compiled by heyfocus.com with additional domains added by @sjmf
!
||inews.co.uk^
@markasoftware
markasoftware / enterprise_token.rb
Last active December 8, 2025 13:51
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################
@Treeki
Treeki / TurnipPrices.cpp
Last active December 8, 2025 04:25
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@npearce
npearce / install-docker.md
Last active September 30, 2025 13:57
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
#!/bin/env python
# -------------------------------------------------------------------------------
# This is a basic implementation of comments with a flat structure,
# as described in my article:
# https://blog.miguelgrinberg.com/post/implementing-user-comments-with-sqlalchemy
# -------------------------------------------------------------------------------
from datetime import datetime
from flask import Flask
@sjmf
sjmf / svgutils_cartopy_china_map_example.ipynb
Last active June 24, 2017 10:01
SVGUtils + Cartopy map compositing example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@seanmhanson
seanmhanson / ableismSanityCheck.md
Created April 3, 2017 16:17
Ableist Language in Code: Sanity Check

Ableist Language in Code: Sanity Check

Removing ableist language in code is important; it helps to create and maintain an environment that welcomes all developers of all backgrounds, while emphasizing that we as developers select the most articulate, precise, descriptive language we can rather than relying on metaphors. Quite simply, avoiding ableist language lets us make sure we are inclusive of all developers, while moving toward language that is simultaneously more acccessible to developers whose first language might not be our own.

The phrase sanity check is ableist, and unnecessarily references mental health in our code bases. It denotes that people with mental illnesses are inferior, wrong, or incorrect, and the phrase sanity continues to be used by employers and other individuals to discriminate against these people.

There are a ton of alternatives, and one of the best ways to select one is to ask yourself: What am I actually checking? and select something more descriptive. In everyday c

@xenopus
xenopus / braveTimemachine.sh
Created January 12, 2017 08:35
Speed up timemachine process.
echo "Removing Low Process Priority Throttling..."
sudo sysctl debug.lowpri_throttle_enabled=0
echo "Renice backupd process"
pid=$(ps alxww | grep -i "backupd$" | awk '{print $2}')
ps alxww | grep -i "backupd$"
sudo renice -10 ${pid}
ps alxww | grep -i "backupd$"
@MightyPork
MightyPork / usb_hid_keys.h
Last active November 6, 2025 19:03
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/