This document is a listing of the functions/macros in Scheme which will be useful in CS 135.
- GitHub Staff
- ed.minni.xyz
- @egregius313
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GITSYNC_REPOS=~/.gitsyncrepos | |
project_root () { | |
old_dir=$(pwd) | |
while ! ls .git 1>/dev/null 2>/dev/null | |
do | |
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder