Skip to content

Instantly share code, notes, and snippets.

View n3dst4's full-sized avatar
:octocat:
fgdxgfdxfg

Neil de Carteret n3dst4

:octocat:
fgdxgfdxfg
View GitHub Profile

Play report: Lovecraftesque — We Serve and Protect

2024-11-25

With apologies to any player whose clues I didn't include. There were too many cool moments to remember them all!

Chapter 1

Chicago, summer of 1973, is a furnace. it's a heatwave, and the city is on fire from within - protests are everywhere, and the police are out in force.

@n3dst4
n3dst4 / ConEmu Git Bash.md
Last active October 20, 2024 23:59
My ConEmu / Cmder git bash task config
  1. Open Conemu

  2. Open Settings -> Tasks or go to new tab button -> Setup tasks.

  3. Click + to add a new task

  4. Enter the name as Git Bash or whatever you like

  5. Task parameters:

     /icon "C:\Program Files (x86)\Git\etc\git.ico" /dir "C:\_git"
    
  6. Command:

@n3dst4
n3dst4 / 1_edge_silverlight.md
Last active September 12, 2024 12:37
Enabling IE Mode in Microsoft edge to allow Silverlight apps to run

MS Edge has a fallback called "Internet Explorer Mode" which will allow Silverlight to run.

To enable Internet Explorer Mode in Edge:

  1. Ensure you have Silverlight installed. You can download it here:
  2. Open Edge. Click the ... button top right, then Settings in the menu.
@n3dst4
n3dst4 / renaming.markdown
Last active February 21, 2024 13:56
How to rename Visual Studio solutions and projects

How to rename solutions and projects in Visual Studio

  1. Don't.

How to rename solutions and projects that were created in Visual Studio

  1. Close Visual Studio and don't open it again until I tell you. Visual Studio is not competent at renaming things.
  2. Assuming you're using git, clean the working folder to remove anything that's not in version control (this will help the search-and-replace step because it won't have to go through a bunch of generated files)

git clean -fdx

@n3dst4
n3dst4 / simple_mta.md
Last active December 30, 2023 16:53
Using Postfix as an MTA so that local mail on a linux box gets delivered to somewhere useful

Simple Postfix MTA Setup for headless hobbyists

So, you're a hobbyist or maybe even a user in a small-scale business capacity and you have some kind of headless Linux (or other *nix) box, maybe it's a VPS or a Raspberry Pi, and you want it to be able to email you with alerts (setting up monitoring is a separate subject!)

History

I went round in circles with this for a while, because it seemed like such a

@n3dst4
n3dst4 / disable-chrome-same-origin.md
Created June 4, 2018 10:38
How to disable same-origin policy (aka CORS checking) in Chrome

You need to run Chrome with two command line flags:

--disable-web-security --user-data-dir

These are kind of documented here: https://peter.sh/experiments/chromium-command-line-switches/

--disable-web-security is the one that turns off the same-origin policy (the name is scarier than the action). Although the docs don't say this, this flag is ignored unless you also specify --user-data-dir. That's because --disable-web-security can be super risky so you shouldn't be surfing in that mode all the time, so Chrome requires you to use an alternative user profile, specified with --user-data-dir. However, you can get away with just giving --user-data-dir and not specifying a dir, and it will use the default one (so you get all your bookmarks, cookies, extension, etc. but --disable-web-security will still feel that honour has been satisfied and tuirn off same-origin policy.

@n3dst4
n3dst4 / hateoas.md
Last active April 10, 2022 03:47
HATEOAS pros/cons

HATEOAS Pros/Cons

+Pros

  • Makes discovery easy (good for new integrators)
  • Encourages consistency
  • Client software does not need to maintain a list of URLs
    • but they do need to maintain a list of link relations
    • but link relations are cleaner?
  • Improves API reuse over long horizons with multiple clients
@n3dst4
n3dst4 / gruvbox_vscode.md
Last active November 10, 2021 10:21
Gruvbox theme for VS Code

You'll need to open the command palette (ctrl-shift-p) and edit your settings file. Add this to the themes:

{
    "background": "#282828",
    "black": "#1D2021",
    "blue": "#458588",
    "brightBlack": "#928374",
    "brightBlue": "#83A598",
 "brightCyan": "#8EC97C",
@n3dst4
n3dst4 / debounce-middleware.ts
Created May 26, 2021 09:50
redux debounce middleware
import { Dispatch } from "react";
import { AnyAction, Store } from "redux";
import { State } from "./types";
/**
* Create a middleware that will debounce actions of a given kind.
*
* Debouncing means that if a certain action happens more than once in a given
* period, only the last one will actually take effect.
*/
@n3dst4
n3dst4 / howto_webp.md
Last active February 6, 2021 11:57
Bulk webp conversion

Howto: bulk convert to .webp

Install webp

sudo apt update
sudo apt install webp

To convert a load of .pngs: