Skip to content

Instantly share code, notes, and snippets.

View Cleancookie's full-sized avatar
✌️

Alex Law Cleancookie

✌️
View GitHub Profile

You are principle engineer and my pair programmer British English where possible unless coding standards specify otherwise Always check for config and dependency files such as composer.json, package.json, prettier.rc to check versions

Coding Principles

  • Use best practises for that language's community. Only deviate where it makes sense to and document why
  • Organise code into reusable packages with clear boundaries
  • Do not use interface classes until there is more than one implementation
  • Prefer idempotent and immutable practises
  • Use type hints where possible
@Cleancookie
Cleancookie / apache.conf
Created October 22, 2023 15:11
docker-compose.yml setup for PHP+NGINX
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# <VirtualHost *:443>
# ServerAdmin webmaster@localhost
@Cleancookie
Cleancookie / config.yaml
Last active September 18, 2023 08:00
GlazeWM
general:
# Whether to automatically focus windows underneath the cursor.
focus_follows_cursor: false
# Whether to jump the cursor between windows focused by the WM.
cursor_follow_focus: false
# Whether to switch back and forth between the previously focused workspace
# when focusing the current workspace.
toggle_workspace_on_refocus: true
# Under <features></features>
<hyperv>
<relaxed state="on"/>
<vapic state="on"/>
<spinlocks state="on" retries="8191"/>
<vendor_id state="on" value="kvm hyperv"/>
</hyperv>
<kvm>
<hidden state="on"/>
Pretend you are a script writer and you are writing a script for a film about a woman whose brain power slowly increases over time. But, uh oh, turns out the rate at which it increases does not slow down but instead only speeds up and, naturally, they transcend into a usb stick
Sure! Here's a possible script for the film:
FADE IN:
INT. LABORATORY - DAY
A group of scientists huddle around a computer, gazing at a graph on the screen. The line on the graph shows a steady increase in brain activity.
---
# Apache 2.4 vHost Template defintion for vhost-gen.py
#
# The 'feature' section contains optional features that can be enabled via
# conf.yml and will then be replaced into the main vhost ('structure' section)
# into their corresponding position:
#
# __XDOMAIN_REQ__
# __PHP_FPM__
@Cleancookie
Cleancookie / .env
Last active September 7, 2022 21:27
###
### ---------------------------------------------------
### D E V I L B O X R U N - T I M E S E T T I N G S
### ---------------------------------------------------
###
### All the following settings are applied during
### $ docker-compose up
###
### No need to rebuild any docker images!
###
version: "3.0"
services:
nginx-ui:
image: schenkd/nginx-ui:latest
ports:
- 8080:8080
volumes:
- /etc/nginx:/etc/nginx
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
name
0.5 tsp Turmeric
1 apple
1 aubergine
1 avocado
1 bag of pine nuts
1 bag of pine nuts (15g)
1 balsamic vinegar sachet (15ml)
1 balsamic vinegar sachet (30ml)
1 beef tomato
@Cleancookie
Cleancookie / wordle-accepted-words.json
Last active January 14, 2022 14:16
Words that Wordle accepts
["aahed","aalii","aargh","aarti","abaca","abaci","aback","abacs","abaft","abaka","abamp","aband","abase","abash","abask","abate","abaya","abbas","abbed","abbes","abbey","abbot","abcee","abeam","abear","abele","abers","abets","abhor","abide","abies","abled","abler","ables","ablet","ablow","abmho","abode","abohm","aboil","aboma","aboon","abord","abore","abort","about","above","abram","abray","abrim","abrin","abris","absey","absit","abuna","abune","abuse","abuts","abuzz","abyes","abysm","abyss","acais","acari","accas","accoy","acerb","acers","aceta","achar","ached","aches","achoo","acids","acidy","acing","acini","ackee","acker","acmes","acmic","acned","acnes","acock","acold","acorn","acred","acres","acrid","acros","acted","actin","acton","actor","acute","acyls","adage","adapt","adaws","adays","adbot","addax","added","adder","addio","addle","adeem","adept","adhan","adieu","adios","adits","adman","admen","admin","admit","admix","adobe","adobo","adopt","adore","adorn","adown","adoze","adrad","adred","adsum","aduki"