Skip to content

Instantly share code, notes, and snippets.

View joejag's full-sized avatar

Joe Wright joejag

View GitHub Profile
HotKeySet("!a", "Main") ;wait for ALT-a keystroke, then go to Main()
While 1
Sleep(100)
WEnd
Func Main()
AutoItSetOption( "MouseCoordMode", 0 )
WinWait( "@Alexander - Discord" )
WinActivate( "@Alexander - Discord" )
@joejag
joejag / glen.txt
Last active July 22, 2023 05:48
Glen Vanderbug
http://www.confreaks.com/videos/282-lsrc2010-real-software-engineering
software engineering doesn't work as it;s taught. At unis, companies (if they care). Techniques we are taught at uni don't: reliably control costs, or create working software at all. We shouldn't be surprised, it's common knowledge across our industry to know this. Not surprising, but odd. Every other field that uses 'engineering' is reserved for processes that work. About a good a definition as any. A set of practices and techniques that have been proved to work, we do the oppoisite!
A lot of discussion, about whether software is really engineering at all. Is is a craft, art, gardening, movie making or something else. Maybe it's an inappropriate metaphor for building sofeware (he disagrees). He thinks it's art, craft and somewhat science.
The problem is the people that have defined the set of disciplines we ccall engineering have forgotten two important things. Software and engineering. This has resulted in se being a chariacture of a

https://www.youtube.com/watch?v=LxO-6rlihSg

Composition rules

  1. Horiztonal Horizons
  • hold the camera with the horizon (no jaunty angles)
  • saves crop and loss
  1. Rule of thirds -
  • Use grid
  • if person walking, put bigger space to the side they are walking. Move/See into.
@joejag
joejag / hiking_kit.md
Last active March 6, 2023 23:10
Things to bring on an overnight hiking adventure

Pack

  • Coat, black fleece
  • extra hat + gloves
  • Boots
  • Sunglasses
  • Toothbrush etc

Done

import datetime as DT
from itertools import cycle
import csv
rota = cycle(
[
"Brown",
"Blue",
"Green + Brown",
"Blue",
Subject Start date
Brown bin day 2023-01-06
Blue bin day 2023-01-13
Green + Brown bin day 2023-01-20
Blue bin day 2023-01-27
Brown bin day 2023-02-03
Green + Blue bin day 2023-02-10
Brown bin day 2023-02-17
Blue bin day 2023-02-24
Green + Brown bin day 2023-03-03
@joejag
joejag / github_teams.py
Created October 29, 2022 11:46
Create a json of the team structure of a Github org
#!/usr/bin/env python3
# Create a JSON of every team and the members for that team
# Final file has the form {"Team 1": [{"name": "Bob Smith", "email": "bob@example.com", "login": "bobsmith"}]}
from collections import defaultdict
import os
import json
from github import Github # pip install pygithub
github_api = Github(os.environ.get("GITHUB_ACCESS_KEY"))
@joejag
joejag / profile.ps1
Last active October 24, 2022 03:46
Powershell profile
# Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
# Install-Module git-aliases -Scope CurrentUser -AllowClobber
# Install-Module PSReadLine -Scope CurrentUser -AllowPrerelease -Force
# Install-Module nvm -Scope CurrentUser
# Copy of the robby russell theme
function Prompt {
if ($?) {
Write-Host '➜' -NoNewline -ForegroundColor Green
}
@joejag
joejag / birthday_paradox.py
Last active October 5, 2022 23:26
The birthday paradox. If you have 23 people, there's a 50% chance they share a birthday
from collections import Counter
from random import randrange
results = []
# Run this 10k times
for _ in range(0, 10000):
# Give me 23 random birth dates given 365 days in a year
birthdays = [randrange(365) for _ in range(23)]
# Check for any overlap

Edit Distance

Write a function that returns whether two words are exactly "one edit" away using the following signature: bool OneEditApart(string s1, string s2); An edit is:

  • Inserting one character anywhere in the word (including at the beginning and end)
  • Removing one character
  • Replacing one character