Skip to content

Instantly share code, notes, and snippets.

View dotspencer's full-sized avatar

Spencer Smith dotspencer

View GitHub Profile
@dotspencer
dotspencer / ctf-toolkit.md
Last active January 27, 2020 18:17
CTF Toolkit

For garbled data that you cant figure out

https://gchq.github.io/CyberChef/

⠛⠲⠵⠉⠁⠍⠚⠧⠛⠽⠟⠙⠉⠝⠚⠗⠑⠁⠽⠞⠊⠍⠵⠁⠛⠑⠆⠙⠅⠊⠃⠭⠛⠊⠟⠙⠊⠍⠃⠁⠛⠑⠒⠞⠉⠊⠃⠗⠛⠥⠒⠎⠁⠍⠚⠺⠛⠥⠟⠙⠊⠍⠃⠁⠛⠑⠆⠞⠊⠊⠃⠗⠛⠟⠆⠎⠁⠍⠚⠥⠛⠑⠟⠙⠉⠝⠗⠎⠑⠁⠽⠞⠅⠝⠗⠁⠛⠑⠆⠙⠅⠊⠃⠗⠛⠟⠆⠉⠁⠝⠃⠟⠑⠁⠽⠞⠍⠝⠃⠁⠛⠑⠆⠞⠁⠊⠃⠗⠛⠟⠆⠎⠁⠝⠃⠟⠑⠁⠽⠞⠊⠍⠗⠁⠛⠑⠆⠙⠉⠊⠃⠗⠛⠽⠵⠎⠁⠍⠚⠧⠛⠑⠟⠙⠉⠝⠃⠞⠑⠁⠽⠞⠍⠍⠵⠁⠛⠟⠽⠉⠁⠍⠚⠧⠛⠲⠟⠙⠉⠝⠃⠺⠑⠁⠆⠙⠁⠊⠃⠗⠛⠁⠵⠎⠁⠍⠚⠭⠛⠑⠟⠙⠉⠝⠃⠎⠑⠁⠽⠞⠊⠝⠚⠁⠛⠑⠒⠙⠑⠊⠃⠗⠛⠁⠵⠎⠁⠍⠚⠧⠛⠁⠟⠙⠉⠝⠃⠧⠑⠁⠽⠞⠊⠝⠗⠁⠛⠟⠽⠟⠿⠿⠿⠿

Use ingredients: from braile and magic

@dotspencer
dotspencer / atob-btoa.md
Created January 17, 2020 20:35
Node atob and btoa
const atob = b64 => Buffer.from(b64, 'base64').toString('binary');
const btoa = text => Buffer.from(text, 'binary').toString('base64');
@dotspencer
dotspencer / crazy.md
Last active January 17, 2022 18:35
VSCode Drives Me Crazy...

Reasons

  1. Tabbing from beginning of line doesn't jump to correct indentation. Only indents one level.
  2. Tab filename can't be hilighted to match source control state (yellow for modified files, green for new, etc.)
  3. The default icons are so distracting and folder names are hard to see. (can be configured but still...)
  4. Dragging tabs around is so annoying. Can't pick which side of a tab you want to move it to.
  5. The UI is so cluttered...
@dotspencer
dotspencer / simple-maze-graph.js
Created September 26, 2019 18:18
Simple Maze Graph Generator
(() => {
const dim = 7;
const graph = {};
const path = [];
// create graph
for (let i = 0; i < dim*dim; i++) {
const row = i % dim;
const col = Math.floor(i / dim);
const edges = [
@dotspencer
dotspencer / stop-https.md
Last active June 18, 2019 02:47
Stop HTTP to HTTPS cached redirect in Chrome

Go to chrome://net-internals/#hsts and type the domain (example.com) into the "Query HSTS/PKP domain" to view it.

If it shows up, type the same domain into the "Delete domain security policies" input and click Delete

@dotspencer
dotspencer / docker.md
Last active June 15, 2019 07:35
Useful docker commands
docker images

docker container ls

docker container ls -a

docker system prune

docker build -t registry.gitlab.com// .
@dotspencer
dotspencer / review-times.csv
Last active June 1, 2019 02:46
Chrome extension review times
Extension Version Start End
Link Match Highlighter 0.1 5/22/19 5/28/19
Link Match Highlighter 0.2 5/28/19 5/31/19
@dotspencer
dotspencer / add-env.md
Last active March 28, 2023 13:58
Three ways to add env variables to a running docker container

1. Add to image at build-time

in .gitlab-ci.yml:

docker build --build-arg VAR_NAME="$VAR_NAME"

$VAR_NAME references a stored env variable from Gitlab CI settings.

in Dockerfile:

@dotspencer
dotspencer / multiple-keys-gitlab.md
Last active March 7, 2024 15:01
Multiple Gitlab accounts with multiple ssh keys

Gitlab won't allow reuse of a public ssh key for multiple accounts. To get around this you need to create a second ssh key for the second account.

Create or modify your ~/.ssh/config file:

# normal                                                                                                                                                                  
Host gitlab.com-work_username
     HostName gitlab.com
     PreferredAuthentications publickey
 IdentityFile ~/.ssh/id_rsa
@dotspencer
dotspencer / people-index.json
Last active May 10, 2019 20:15
SWAPI all people [backup]
[
"https://gist.githubusercontent.com/dotspencer/10f9e59cbccfd7b12b9a663a56c41f92/raw/0c2ad72be6c634f822131832f59d0eccdd6655cc/people-page-1.json",
"https://gist.githubusercontent.com/dotspencer/10f9e59cbccfd7b12b9a663a56c41f92/raw/0c2ad72be6c634f822131832f59d0eccdd6655cc/people-page-2.json",
"https://gist.githubusercontent.com/dotspencer/10f9e59cbccfd7b12b9a663a56c41f92/raw/0c2ad72be6c634f822131832f59d0eccdd6655cc/people-page-3.json",
"https://gist.githubusercontent.com/dotspencer/10f9e59cbccfd7b12b9a663a56c41f92/raw/0c2ad72be6c634f822131832f59d0eccdd6655cc/people-page-4.json",
"https://gist.githubusercontent.com/dotspencer/10f9e59cbccfd7b12b9a663a56c41f92/raw/0c2ad72be6c634f822131832f59d0eccdd6655cc/people-page-5.json",
"https://gist.githubusercontent.com/dotspencer/10f9e59cbccfd7b12b9a663a56c41f92/raw/0c2ad72be6c634f822131832f59d0eccdd6655cc/people-page-6.json",
"https://gist.githubusercontent.com/dotspencer/10f9e59cbccfd7b12b9a663a56c41f92/raw/0c2ad72be6c634f822131832f59d0eccdd6655cc/people-