Skip to content

Instantly share code, notes, and snippets.

View pcewing's full-sized avatar

Paul Ewing pcewing

  • Blizzard Entertainment
View GitHub Profile
@pcewing
pcewing / seeds.md
Last active September 3, 2023 17:26
Descenders Seeds
  • Highlands Mellow Jump Course: 10052780000
  • Another fun highlands jump course: 10060689982
  • Decent Peaks Jumps: 40002839024
  • Decent Canyon Stunts: 30051868939
  • Decent Forest Stunts: 20020797859
  • Awesome Canyoun Stunts: 30040845600
  • Best Canyon course: 30030686541
  • Dirt Jumps (Canyon): 30030809329
  • Good straight steep canyon: 30080048490
  • Fun no-break canyon course: 30050366302
@pcewing
pcewing / rename_mp3s.py
Last active December 1, 2022 21:24
Rename MP3 Files
#!/usr/bin/env python3
import os
import mutagen.id3
import unicodedata
import re
import errno
from shutil import copyfile
OUTPUT_FILENAMES = set()
@pcewing
pcewing / gslp_2021.md
Last active May 25, 2021 15:19
GSLP 2021

GSLP Strength Chart

Date Bench Press Strict Press Back Squat Deadlift
2021/04/02 120x5,5,6 195x5,5,10
2021/03/31 180x5,5,12 265x10
2021/03/29 115x5,5,7 190x5,5,10
2021/03/26 N/A N/A N/A N/A
2021/03/24 175x5,5,8 255x10
2021/03/22 110x5,5,8 185x5,5,10
@pcewing
pcewing / bash_base.sh
Created June 18, 2020 17:55
Bash script base, useful common utilities for shell scripting
#!/usr/bin/env bash
function yell () { >&2 echo "$*"; }
function die () { yell "$*"; exit 1; }
function try () { "$@" || die "Command failed: $*"; }
script_path="$( realpath "$0" )"
script_dir="$( dirname "$script_path" )"
@pcewing
pcewing / main.c
Created June 18, 2020 01:19
Simple thread-safe queue in C
#include "queue.h"
#include <stdio.h>
#define UNUSED(x) ((void)(x))
void string_print_callback(void *item) {
const char *str = item;
printf("%s", str);
}
@pcewing
pcewing / epoll_mpd_client.c
Created June 16, 2020 04:09
Example epoll-based ncurses MPD client
#include <curses.h>
#include <mpd/client.h>
#include <stdlib.h>
#include <sys/epoll.h>
#include <unistd.h>
#define MAX_EVENTS 10
void
toggle_play_pause(struct mpd_connection *mpd_conn) {
@pcewing
pcewing / gslp.md
Last active March 2, 2020 19:37
GSLP Strength Chart

GSLP Strength Chart

Date Bench Press Strict Press Back Squat Deadlift
2020/02/29 105x5,5,11 305x10
2020/02/26 190x5,5,8 205x5,5,8
2020/02/19 100x5,5,10 295x10
2020/02/16 185x5,5,11 200x5,5,8
2020/02/13 95x5,5,12 285x10
2020/02/11 180x5,5,10 195x5,5,8
FROM centos:latest
RUN groupadd -r -g 1001 john && \
groupadd -r -g 1050 myapp && \
useradd -rM -g john -G myapp -u 1001 john && \
mkdir -p /var/john && \
chown -R john:john /var/john
USER john:john
@pcewing
pcewing / issue
Last active January 30, 2020 05:29
Customized login screen (/etc/issue) for Manjaro


__ __ __ __ _ _ __ _____ ____ ______ __
| \\ / | / \\ | \\ | | | | / \\ | _ \\ / __ \\ | || |
| \\/ | / /\\ \\ | | \\ | | | | / /\\ \\ | |_| / / / \\ \\ | ___|| |
| |\\__/| |/ ____ \\| |\\ \\| |_ | |/ ____ \\ | __ \\ / / \\ \\ | | __ | |
| | | | / \\ \\ | \\ \\ | \\_/ / / \\ \\| | \\ \\\\ \\____/ / | || || |
|_| |_|/ \\_\\| \\__|\\___/_/ \\_\\_| \\_\\\\______/ |__||__||__|
Manjaro Linux \r