Skip to content

Instantly share code, notes, and snippets.

View mattdutson's full-sized avatar

Matt Dutson mattdutson

View GitHub Profile
@mattdutson
mattdutson / index.theme
Last active December 8, 2023 00:30
Papirus icon theme that only applies to apps
[Icon Theme]
Name=Papirus-Apps
Comment=Papirus app icons
Inherits=Adwaita
# Directory list
Directories=16x16/apps,16x16@2x/apps,22x22/apps,22x22@2x/apps,24x24/apps,24x24@2x/apps,32x32/apps,32x32@2x/apps,42x42/apps,48x48/apps,48x48@2x/apps,64x64/apps,64x64@2x/apps,84x84/apps,96x96/apps,128x128/apps,symbolic/apps
[16x16/apps]
Context=Applications
@mattdutson
mattdutson / repo_snapshots.md
Last active August 11, 2023 14:53
Publishing a snapshot of a private repo to a public repo

First-Time Setup

We will create a new public branch that pushes to https://github.com/my-public-repo.git.

Retrieve the first commit hash:

git rev-list --max-parents=0 HEAD

Create a new public branch that starts from the first commit:

@mattdutson
mattdutson / pi_ssh_hardening.md
Last active November 20, 2022 02:17
Raspbery Pi SSH hardening

SSH Configuration

The SSH configuration file is located at /etc/ssh/sshd_config.

Authentication

Disable password authentication - only allow public-key authentication. This can be configured when creating the boot media using the Raspberry Pi Imager tool. If the Pi has already been set up, password authentication can be disabled by setting

PasswordAuthentication: no
@mattdutson
mattdutson / papermc.md
Last active December 14, 2022 23:46
PaperMC server configuration

bukkit.yml

Overwrite the following values in bukkit.yml:

chunk-gc:
  period-in-ticks: 400
ticks-per:
  monster-spawns: 4
@mattdutson
mattdutson / covid-19_model.ipynb
Last active September 25, 2021 02:27
COVID-19 model
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattdutson
mattdutson / .clang-format
Created August 15, 2019 18:16
clang-format options I like
---
# These options are designed to work with clang-format 8
# http://releases.llvm.org/8.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# Remove to make these settings the cross-language default
Language: Cpp
# Indentation rules
ContinuationIndentWidth: 2
IndentWidth: 2
@mattdutson
mattdutson / coin_flip.md
Last active June 21, 2019 20:37
Coin Flip Riddler

Coin Flip Riddler

This is my solution to this FiveThirtyEight Riddler problem.

Prompt

From Michael Sarkis, a puzzle that his friend was asked to answer during an interview at an investment bank:

There is a square table with a quarter on each corner. The table is behind a curtain and thus out of your view. Your goal is to get all of the quarters to be heads up - if at any time all of the quarters are heads up, you will immediately be told and win.

@mattdutson
mattdutson / night_king.ipynb
Last active June 21, 2019 20:47
How Many Soldiers Do You Need To Beat The Night King?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.