Skip to content

Instantly share code, notes, and snippets.

View Kevin-Mok's full-sized avatar

Kevin Mok Kevin-Mok

View GitHub Profile
@Kevin-Mok
Kevin-Mok / most-common-ivs.py
Last active August 13, 2021 09:17
Script to calculate the most common IV percentages in Pokemon Go.
from pprint import pprint
FLOOR_IV = 10
CEILING_IV = 15
IV_TYPES = 3
MAX_IV = CEILING_IV * IV_TYPES
def populate_iv_dict():
"""Returns iv_dict with key as IV percent and value as
number of IV combinations with that percent.
@Kevin-Mok
Kevin-Mok / devops-sre-learned.md
Last active July 27, 2021 17:41
My learned DevOps/SRE technologies/concepts.

Development Experience

  • Kubernetes
    • OpenShift
    • operators
  • Golang
  • Python
  • Javascript
  • working with command-line

Working Knowledge

@Kevin-Mok
Kevin-Mok / crimson-commands.md
Last active December 17, 2019 02:59
My Red Discord bot commands reference.

Type ,help (or ,h for short) for a DM containing all the commands. Type ,help <command> for more info on a command.

Leveler

Command Short Description
,profile ,p Show your leveler progress. Default to yourself.
,profileset Change settings of your profile.
,toplevel ,lb Show the server leaderboard!

Economy

@Kevin-Mok
Kevin-Mok / fix-assets.sh
Created October 22, 2019 00:18
Bash script to fix assets for Project Uranium.
#!/bin/bash
# Bash script to fix assets for Project Uranium as per Step 5 in:
# https://github.com/acedogblast/Project-Uranium-Godot/wiki/Setup-and-Building-Instructions
# Prerequisites:
# - Steps 1-4
# - ffmpeg is in your PATH or installed
# - run from project folder where Audio, Fonts and Graphics
# directories are located
# 1-4
@Kevin-Mok
Kevin-Mok / commands-graph.py
Last active April 15, 2019 13:04
Daily average for Fish commands.
#!/usr/bin/python3
# Print out table of daily average for every week of Fish command history.
import re
from datetime import datetime, timedelta
from pprint import pprint
from prettytable import PrettyTable
from os import getenv
from argparse import ArgumentParser
@Kevin-Mok
Kevin-Mok / !rt-scraper.py
Last active April 15, 2019 12:39
Scrape Top Box Office movies from Rotten Tomatoes.
#!/usr/bin/python3
# Display Top Box Office movies from Rotten Tomatoes.
import requests
import colored
from pprint import pprint
from bs4 import BeautifulSoup
# from colored import fg, bg, attr
from colored import stylize
from prettytable import PrettyTable
@Kevin-Mok
Kevin-Mok / !shuffler
Last active April 15, 2019 12:37
Create a shuffle "playlist" for the files in a directory.
#!/bin/bash
# Shuffle files for current/given directory. Creates a shuffle cache file
# in directory, which rotates through the entire directory contents before
# regenerating.
# vars {{{ #
shuffle_cache="shuffle.txt"
regen_flag=0
dir=""