Skip to content

Instantly share code, notes, and snippets.

View tkanarsky's full-sized avatar

Timothy Kanarsky tkanarsky

  • Los Angeles, CA
View GitHub Profile

User

Turn the phrase "the quick brown fox jumped over the lazy dog" into ASCII art.


ChatGPT

Here is one possible ASCII art representation of the phrase "the quick brown fox jumped over the lazy dog":

User

Render a chessboard as a Markdown table.


ChatGPT

Here is a chessboard represented as a Markdown table:

User

Could you give me an example of all your formatting options?


ChatGPT

Sure! Here are some examples of formatting options that are available in most text editing programs:

@tkanarsky
tkanarsky / commands.sh
Last active May 16, 2022 14:15
Cool bash commands, one-liners I found helpful or interesting
# Live audio broadcast over the Internet in one line of bash
# Currently only works for one client
while true; do cat <(echo -e "HTTP/1.1 200 OK\r\nContent-type: audio/mp3\r\nContent-Disposition: inline\r\n\r\n") <(arecord --format=cd | lame -r -) | nc -l 8080; done
# Preview a pandoc-rendered markdown document
# Requires installation of `inotify-tools` `pandoc`, `texlive`, `texlive-latex-extra`
while inotifywait document.md; do pandoc -V geometry:margin=1in document.md -o document.pdf; done
@tkanarsky
tkanarsky / gradescope_ucla.js
Created February 7, 2022 03:11
Overwrites gradescope login button to take you directly to university's SAML page instead of login modal
// ==UserScript==
// @name Gradescope UCLA Login
// @version 1
// @grant none
// @include https://www.gradescope.com/
// ==/UserScript==
window.addEventListener('load', function() {
let button = document.getElementsByClassName("js-logInButton")[0];
button.replaceWith(button.cloneNode(true)); // get rid of existing event handlers
@tkanarsky
tkanarsky / kb_clean.sh
Created May 6, 2021 18:21
Keyboard cleaning script -- disables keyboard for some number of seconds
#!/bin/bash
xinput --list
echo "Enter keyboard id:"
read kb
echo "Enter time to disable keyboard (sec):"
read sec
xinput set-prop $kb "Device Enabled" 0;