Skip to content

Instantly share code, notes, and snippets.

View egregius313's full-sized avatar

Edward Minnix III egregius313

View GitHub Profile
@egregius313
egregius313 / prs.sh
Created December 31, 2022 22:54
Script for pasting a list of PRs in Slack using Alfred
#!/usr/bin/env sh
# Get the GitHub username from ~/.gitconfig
USERNAME=$(git config github.user)
# Replace this with the relevant repository
REPO=github/codeql
gh pr list -A "$USERNAME" -R $REPO --json isDraft,title,labels,url \
| jq -r '
# Get the draft status of the PR and translate it to the GitHub Slack emoji
@egregius313
egregius313 / keybase.md
Created August 5, 2019 13:06
Keybase proof

Keybase proof

I hereby claim:

  • I am egregius313 on github.
  • I am egregius313 (https://keybase.io/egregius313) on keybase.
  • I have a public key ASCL_zbFegLAJnK_yv-stp5WMN5ktXqeDCjWwEPEMkvbSgo

To claim this, I am signing this object:

@egregius313
egregius313 / wallpaper-per-monitor.org
Last active June 11, 2019 14:09
HOWTO: Set different wallpaper image per-monitor on Windows 10

Howto: Set different wallpaper per monitor

Using Settings

  1. Press Win+R
  2. Specify control /name Microsoft.Personalization /page pageWallpaper and hit enter
  3. Select the images you want. Right-click on each to select the specific monitor(s) you want to use.
@egregius313
egregius313 / git-sync.sh
Created December 19, 2018 01:45
git-sync Synchronize files across machines via Git
#!/bin/bash
GITSYNC_REPOS=~/.gitsyncrepos
project_root () {
old_dir=$(pwd)
while ! ls .git 1>/dev/null 2>/dev/null
do
cd ..
#lang eopl
;; Given a quoted logical expression, convert it into nands.
;; Does little to no optimization in terms of output size
(define (super-nand! expr)
(if (and (list? expr) (not (null? expr)))
(case (car expr)
['not (let [[x (super-nand! (cadr expr))]]
(list 'nand x x))]
@egregius313
egregius313 / scheme-help.md
Last active January 26, 2024 00:06
CS 135 Scheme Cheatsheet
@egregius313
egregius313 / cs392_mac_setup.sh
Created February 17, 2018 02:32
Script for setting up the proper GCC set up for CS 392 on macOS
#!/bin/bash
# Script for setting up the proper GCC set up for CS 392 on macOS
# This script installs GCC version 6
# Check for Homebrew and install it if not present
echo "Checking for brew"
if ! which brew
then
echo "Installing Homebrew"
@egregius313
egregius313 / check_cflags.py
Created February 16, 2018 17:29
check_cflags - guarantees that -Wall -Werror --pedantic flags are set in $CFLAGS
#!/usr/bin/env python
# check_cflags.py
"""
check_cflags - guarantees that -Wall -Werror --pedantic flags are set in $CFLAGS
Exits with 0 if proper CFLAGS is used, otherwise returns with 1
Usage:
./check_cflags.py FILE
"""
@egregius313
egregius313 / mac_bootstrap_gcc.sh
Created February 8, 2018 19:38
Script for bootstrapping gcc and g++ (4.9) on Mac OSX
#!/bin/bash
which brew || /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gcc@4.9
echo "alias gcc='gcc-4.9'" >> .bash_profile
echo "alias g++='g++-4.9'" >> .bash_profile
@egregius313
egregius313 / ocaml_bootstrap.sh
Created January 17, 2018 17:09
Bootstrap an OCaml Installation on a Debian or OSX system
PKG_MGR=$(which apt-get brew apt | head -n1)
sudo $PKG_MGR update
sudo $PKG_MGR install -y opam
opam update
opam install core
if [[ $PKG_MGR =~ apt ]]
then