Skip to content

Instantly share code, notes, and snippets.

View catleeball's full-sized avatar
🏳️‍⚧️

Cat Ball catleeball

🏳️‍⚧️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am catleeball on github.
  • I am catherine (https://keybase.io/catherine) on keybase.
  • I have a public key ASDbfe8MjbkO5ASZKgKjkguXRU1OTnvXnDHamkYdul2JSQo

To claim this, I am signing this object:

def IsBucketNameValid(bucket_name):
"""Check if string meets all bucket name requirements.
Requirements for bucket names defined at:
https://cloud.google.com/storage/docs/naming
Args:
Unicode tring, name of bucket. Full name, including provider prefix, i.e.:
'gs://my-bucket-name'
Returns:
def _MaybeTextFile(filename):
"""Check if text file based on file(1)
Implementation stolen shamelessly from:
https://stackoverflow.com/a/7392391/2873090
Args:
filename: String describing a path to a file
Returns:
Boolean: True if the first 1024 bytes seem to indicate a text file
"""
textchars = bytearray({7, 8, 9, 10, 12, 13, 27} |
function git-cherry-pit {
# From https://sethrobertson.github.io/GitFixUm/fixup.html#remove_deep
# Removes a commit from git history, similar to using drop in rebase -i
if [ "$#" -ne 1 ]; then
echo "Usage: $ git-cherry-pit SHA"
fi
git rebase -p --onto $1^ $1
}
function pigball {
# ==============================================================================
# PS1 setup
# Color Variables
BOLD=$(tput bold)
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
BLUE=$(tput setaf 4)
PURPLE=$(tput setaf 5)
key_bindings:
# MacOS keybinds =====
# https://github.com/alacritty/alacritty/blob/master/alacritty.yml#L611-L626
- { key: N, mods: Command, action: SpawnNewInstance }
- { key: Q, mods: Command, action: Quit }
- { key: Key0, mods: Command, action: ResetFontSize }
- { key: Equals, mods: Command, action: IncreaseFontSize }
- { key: Add, mods: Command, action: IncreaseFontSize }
- { key: Minus, mods: Command, action: DecreaseFontSize }
@catleeball
catleeball / TwitchPlaysCoQ.go
Last active May 18, 2021 22:20
Twitch Plays Caves of Qud
// Go script to allow Twitch viewers to play Caves of Qud via Twitch chat.
//
// This is a really messy, hacky, bad script.
package main
import (
"fmt"
"regexp"
"strings"

Chapter 2, Problem 2: Structural Ambiguity

Show that the grammar in (23) can account for the ambiguity of each of the following sentences by providing at least two trees licensed for each one, and explain briefly which interpretation goes with which tree:

  • (i) Bo saw the group with the telescope.
  • (ii) Most dogs and cats with fleas live in this neighborhood.
  • (iii) The pictures show Superman and Lois Lane and Wonder Woman.
@catleeball
catleeball / CH4_P1.md
Last active October 12, 2022 23:25
LING 566 HW2

Problem 1: Valence Variations

In this problem, you will be asked to write lexical entries (including HEAD, SPR, and COMPS values). You may use NP, VP, etc. as abbreviations for the feature structures on COMPS lists.

As you do this problem, keep the following points in mind: (1) In this chapter we’ve changed COMPS to be a list-valued feature, and (2) heads select for their specifier and complements (if they have any); the elements on the SPR and COMPS lists do not simultaneously select for the head.

syntax on
" Forgot sudo, save with sudo: https://stackoverflow.com/a/7078429
cmap w!! w !sudo tee > /dev/null %
set mouse=a
set number
set relativenumber
set ruler