Skip to content

Instantly share code, notes, and snippets.

View mick-io's full-sized avatar

Mick Piereder mick-io

View GitHub Profile
@mick-io
mick-io / slc-weather-mailer.py
Created August 14, 2017 01:49
Python SLC Weather Mailer
"""
Collects email address and names from a text field 'emails.txt' located in the
same directory. Send a weather daily weather forecast of Salt Lake City pulled
in the from the Open Weather Map Api via a gmail account.
"""
import getpass
import smtplib
import requests
@mick-io
mick-io / keybase.md
Created July 13, 2018 08:12
Keybase Proof

Keybase proof

I hereby claim:

  • I am mick-io on github.
  • I am mick_kb (https://keybase.io/mick_kb) on keybase.
  • I have a public key ASDgLnCDtnuryINRny7rPR20mMxKMnHpmdvyoDy7om3esQo

To claim this, I am signing this object:

@mick-io
mick-io / street-suffix-abbreviations.json
Last active May 31, 2024 03:52
C1 Street Suffix Abbreviations from USPS. The keys represent the USPS standard abbreviations, the arrays contain primary and commonly used suffixes and abbreviations.
{
"ALY": [
"ALLEY",
"ALLEE",
"ALLY"
],
"ANX": [
"ANEX",
"ANNEX",
"ANNX"
@mick-io
mick-io / test_passed.txt
Created December 8, 2018 18:13
Test Passed Message
,@@@@@@@@@@,,@@@@@@@% .#&@@@&&.,@@@@@@@@@@, %@@@@@@%* ,@@@% .#&@@@&&. *&@@@@&( ,@@@@@@@% %@@@@@, ,@@,
,@@, ,@@, ,@@/ ./. ,@@, %@% ,&@# .&@&@@( .@@/ ./. #@&. .,/ ,@@, %@% *&@&. ,@@,
,@@, ,@@&%%%%. .&@@/, ,@@, %@% ,&@# %@& /@@, .&@@/, (@@&%(*. ,@@&%%%%. %@% &@# ,@@,
,@@, ,@@/,,,, ./#&@@@( ,@@, %@@@@@@%* /@@, #@&. ./#&@@@( *(%&@@&. ,@@/,,,, %@% &@# .&&.
,@@, ,@@, ./, .&@# ,@@, %@% ,@@@@@@@@@% ./. .&@# /*. /@@. ,@@, %@% *&@&. ,,
,@@, ,@@@@@@@% .#&@@@@&/ ,@@, %@% .&@# ,@@/.#&@@@@&/ /%&@@@@. ,@@@@@@@% %@@@@@. ,@@,
,*************,,*/(((((//,,*(#%%%%%%%%%%%%%%%#(*,,,****************************************************,*/(((((((((/((((////****/((##%%%%%%
,*************,,//((((((//,,*(%%%%%%%%%%%%%%%%%##/
@mick-io
mick-io / loren.txt
Last active July 17, 2019 19:49
Loren & Bacon Ipsum
This file has been truncated, but you can view the full file.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum bibendum ex sit amet scelerisque dignissim. Curabitur bibendum egestas felis, id convallis turpis viverra a. Duis nec dui fermentum, aliquet nisi finibus, porta risus. Integer tellus ex, faucibus nec ipsum nec, consequat vehicula lacus. Quisque eu velit laoreet, imperdiet nunc nec, hendrerit dolor. Aenean molestie blandit ex, id aliquam risus semper placerat. Fusce egestas, tellus nec tincidunt luctus, magna dolor tempor magna, ac placerat orci mauris nec urna. Nulla ornare bibendum orci ac consectetur. Phasellus viverra massa tortor, ut semper velit maximus ornare. Pellentesque aliquet interdum nisi, vulputate malesuada ligula vulputate at. Suspendisse nec aliquam orci. Integer pretium dolor non urna pretium accumsan. Nulla consectetur quis elit ac lobortis. Morbi vulputate tincidunt purus et ultrices. Vestibulum massa magna, fermentum sit amet aliquam sed, dignissim et enim. Mauris eu facilisis lorem.
Praesent placerat rutrum aliquam. Viva
@mick-io
mick-io / find_and_replace.py
Created August 1, 2019 14:45
A find and replace script written in Python. (Works with Unix Systems only)
#!/usr/bin/env python3
from argparse import ArgumentParser
from multiprocessing import cpu_count
from os import getcwd, listdir, path, system
from queue import Queue
from threading import Thread
from typing import List
_FILEPATHS = Queue(maxsize=cpu_count() - 1)
#!/usr/bin/env node
const http = require("http");
const PORT = process.argv[2] || 8000;
const server = http.createServer((req, res) => {
let data = "";
req.on("error", err => {
throw err;
});
@mick-io
mick-io / update-a-fork-from-original-repository.md
Created November 20, 2019 17:38
Sync a fork of a repository to keep it up-to-date with the upstream repository.

Update a fork from it's original repository

  • Open the termianl & change the current working directory to your local project.

  • List the current configured remote repository for your fork.

$ git remote -v
> origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
> origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
@mick-io
mick-io / pong.py
Created February 4, 2020 01:12
Python Pong
#!/usr/bin/env python3
import turtle
# Adjust this value to increase or decrease the ball's movement speed.
BALL_PIXELS_PER_MOVEMENT = .15
SCORE_FONT = ("Courier", 24, "normal")
score_a, score_b = 0, 0
window = turtle.Screen()

Docker Container CLI Commands

Run a container

# Running a container
# '-d' flag: Run container in background and print container ID
# '--name string' flag: Assign a name to the container
# '-p' flag: Publish a container's port(s) to the host