Skip to content

Instantly share code, notes, and snippets.

View sjmf's full-sized avatar
🏠
Working from home

Samantha Finnigan sjmf

🏠
Working from home
View GitHub Profile
@sjmf
sjmf / filter.txt
Last active March 13, 2024 14:15
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^
@Treeki
Treeki / TurnipPrices.cpp
Last active May 27, 2024 15:18
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 June 5, 2024 20:07
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$"
@kentbrew
kentbrew / pinmarklet.md
Last active April 9, 2024 18:34
How to recreate your long-lost Pinterest bookmarklet.

How to recreate your long-lost Pinterest bookmarklet.

Right-click your bookmarks bar and choose Add Page (Chrome) or New Bookmarklet (Firefox).

In Name, put this:

Pin It

In URL, put this:

#!/usr/bin/env python
"""Save all Unicode characters as individual images.
Based on @JackNova's answer http://stackoverflow.com/a/22612295
To save as jpeg, install libjpeg before installing Pillow e.g.:
$ sudo apt-get install libjpeg-dev -y
$ pip install -U pillow # assuming a virtualenv is active
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #