Skip to content

Instantly share code, notes, and snippets.

View daltonpearson's full-sized avatar

Dalton Pearson daltonpearson

View GitHub Profile
{
"keys":[
{
"kty":"RSA",
"kid":"jwt_tool",
"use":"sig",
"e":"AQAB",
"n":"vJmOamBSOw5SIn8SE7vgTpIg_5aMfiHI7jMK2JVkQIAeMjxzv-E5s0WhgD9j6lnTcwHcv_jMUWOpthQoMfGNXFFfkC6zoOKPKEALR3mm4D8krlObpo6gHc8tz5r8SFL4NWB9A6dAfIc77v4LOehwvX_5cmQj-GEbY8UbOksCxqoxc4x5v9f6VcGmnyYQfqHQDzm5MNUabUS1IZ9jAmpZq8fN59TFubKASmfmlvnr-rgJwjkUdT3mIMcBJXi8TKCGepJJwazTm86ogyAJhue9llOW-ED5w_FRde3GDN1ahyNcJpsLkUS1JgcT60yA_Y0M8LEbJizwVifUbtdXiSp9dQ"
}
]
{
"basics": {
"name": "Dalton Pearson",
"label": "Production Systems Technologist at Doyle Boston Sails",
"image": "",
"email": "[email protected]",
"phone": "+1 519-330-3218",
"url": "https://daltonpearson.ca",
"summary": "Currently working as a Production Systems Technologist at Doyle Boston Sails. I have a passion for understanding how things work and love fixing anything from combustion engines to software and electrical systems. I'm at my best when I'm wading into uncharted waters and working on things outside my comfort zone to expand my skill set.",
"location": {
import tarfile
import os
input = './input'
output = './output'
for dirpath, dir, files in os.walk(top=input):
for file in files:
tar = tarfile.open(os.path.join(dirpath, file))
tar.extractall(path=output)
tar.close()
@daltonpearson
daltonpearson / index.html
Created December 4, 2020 04:05
Shredberg Redirect
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Shredberg</title>
</head>
<script>
window.location.replace("https://www.twitch.tv/shredberg");
import random
from collections import Counter
def roll_dice(number_of_dice, number_of_faces):
rolls = []
for roll_number in range(1, (number_of_dice + 1)):
roll = random.randrange(1, (number_of_faces + 1))
print(f"Roll #{roll_number}: {roll}")
@daltonpearson
daltonpearson / main.py
Created November 1, 2019 19:39
No Overview Available: Overview by @thepythoneer
##############################
# Dalton Pearson - 19/1/2019 #
# Twitter - @ThePythoneer #
# Python Version >= 3.6 #
# A script to generate #
# an overview from the data #
# at NoOverviewAvailable.com #
##############################
import urllib
@daltonpearson
daltonpearson / Handy_Snippets.md
Created August 7, 2019 16:32
Handy Code Snippets
https://radar.weather.gov/ridge/lite/
https://radar.weather.gov/ridge/lite/NET/
https://radar.weather.gov/ridge/lite/N0V/
Index of /ridge/RadarImg
https://radar.weather.gov/ridge/RadarImg/
Index of /ridge/RadarImg. [ICO], Name · Last modified · Size · Description. [DIR], Parent Directory, -. [DIR], N0R/, 04-May-2018 08:37, -. [DIR], N0S/, 04-May-2018 ...
Index of /ridge/RadarImg/N0R/FWS
https://radar.weather.gov/ridge/RadarImg/N0R/FWS/
Name · Last modified · Size · Description. [DIR], Parent Directory, -. [IMG], FWS_20180628_1528_N0R.gif, 28-Jun-2018 20:32, 956. [IMG] ...
Ryan and Dalton's: Add-Commit-Push
do
git config --global alias.acp '!f() { git checkout -b $1 ; git add . ; git commit -m "$2" ; git push -u origin $1; }; f'
Then you can just do
git acp "<branchname>" "<commit message>"
2A. Add the following playlist information to the database.
The playlist, Songs to Play to Your Pugs, was created on November 15, 2017, and it has the following songs
listed on it in this order:
i. You Got Gold
ii. Birds
iii.I Don’t Know Why
iv. Everywhere I Go
*/
INSERT INTO PLAYLIST(playListName,playListCreatedOn)
VALUES ('Songs to Play to Your Pugs', 'November 15, 2017')