| Topic | Purpose | Command / Action | Notes |
|---|---|---|---|
| Install Git | Install Git on your computer | macOS: brew install gitUbuntu/Debian: sudo apt update && sudo apt install gitWindows: git-scm.com/downloads |
Windows users should install Git Bash |
| Configure user info | Set your name and email for commits | git config --global user.name "Your Name"git config --global user.email "[email protected]" |
Run once per computer; use git config --list to verify |
| Authenticate with GitHub | Enable push/pull access | SSH method:ssh-keygen -t ed25519 -C "[email protected]"cat ~/.ssh/id_ed25519.pub → add key on GitHub → Settings → SSH Keys |
SSH is recommended for long-term setup |
| Start a repo | Create a Git repository in a folder | git init |
Creates a hidden .git folder |
| Add files | Track all files in the direct |
- open a terminal (on Mac, you can use the "Terminal" application). In these instructions, when it says "run
some command", that means to type or copy/paste that command into a prompt in your terminal. - have a directory with code in it, with an index.html file that does what you want when you view it in a browser. Navigate into that directory in the terminal, using the
cdcommand, like:cd ~/somefolder/someotherfolder/whereyourcodeis/ - have the
gitprogram installed (you can check if it is installed by runningwhich git; if it does nothing, git is not installed. If it shows you a directory path that ends in "git", it is installed.) - in a separate terminal window, navigate to your same code directory, and run Claude Code using
claude - go to github.com; create an account if you don't have one.
- create a GitHub project; call it whatever you want (I suggest not using spaces)
- once it's created, you'll see a page that says "Quick setup". Under it should be a section called "…or create a n
Adapted from @tom-doerr
- Variable Naming:
- Use explicit, type-indicating prefixes for numeric values (e.g., numFireTokens vs fire)
- Prefer descriptive suffixes that indicate the data's purpose (e.g., maxWaterTokens, fireSpaces)
- Avoid ambiguous single-word names that could represent multiple concepts
This file contains hidden or 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
| gcalcli --client-id=IDHERE.apps.googleusercontent.com --client-secret=SECRETHERE add --calendar "CALENDARNAMEHERE" --duration 120 --where "Brattle Theater, Cambridge, MA" --noprompt --when "1/1/2024 5:00pm" --title "Lunch with mom" |
This file contains hidden or 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
| p1 & (@small | @morning) & !@evening & today, p2 & (@small | @morning) & !@evening & today, p3 & (@small| @morning) & !@evening & today, p1 & !@small & !@morning & !@evening & (today | !@date-specific & ((due after: +2 days & due before: +4 days) | (due after: +9 days & due before: +12 days) | (due after: +35 days & due before: +40 days) | (due after: +75 days & due before: +85 days))), p2 & !@small & !@morning & !@evening & (today | !@date-specific & ((due after: +9 days & due before: +12 days) | (due after: +35 days & due before: +40 days) | (due after: +75 days & due before: +85 days))), p3 & !@small & !@morning & !@evening & (today | !@date-specific & ((due after: +9 days & due before: +12 days) | (due after: +35 days & due before: +40 days) | (due after: +75 days & due before: +85 days))), overdue & @small, No priority & !@evening & today, @evening & today |
This file contains hidden or 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
| import time | |
| import timeit | |
| from multiprocessing.dummy import (Pool, TimeoutError) | |
| def delay(mynum, delay_secs): | |
| print("starting #%s" % mynum) | |
| time.sleep(delay_secs) | |
| print("done with #%s" % mynum) | |
| return True |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <script src="https://code.jquery.com/jquery-git.js"></script> | |
| <script language="JavaScript"> | |
| $( document ).ready(function() { | |
| $("#add").on("click", function() { |
This file contains hidden or 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
| elementIsVisible (element) { | |
| return this.driver.wait(until.elementIsVisible(element)); | |
| } | |
| elementIsNotVisible (element) { | |
| return this.driver.wait(until.elementIsNotVisible(element)); | |
| } | |
| const abbyElement = await findByText('Abby'); // Should show editor for new costume | |
| await elementIsVisible(abbyElement); |
This file contains hidden or 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
| const costumesTabElement = await findByText('Costumes'); | |
| await driver.wait(() => { | |
| return costumesTabElement.isDisplayed().then(displayed => { | |
| console.log('got here A'); | |
| if (!displayed) return false; | |
| console.log('got here B'); | |
| // costumesTabElement.click(); | |
| return costumesTabElement.isEnabled(); | |
| }); |
This file contains hidden or 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
| import datetime | |
| import pytz | |
| # careful, don't assume now() is nyc time! on ec2, it's utc time. | |
| def datetime_from_tz_naive_nyc_to_tz_aware_utc(nyc_datetime_tz_naive): | |
| nyc_datetime_tz_aware = pytz.timezone('US/Eastern').localize(nyc_datetime_tz_naive) | |
| return nyc_datetime_tz_aware.astimezone(pytz.utc) | |
| def utc_tz_aware(utc_datetime_tz_naive): | |
| return pytz.timezone('UTC').localize(utc_datetime_tz_naive) |
NewerOlder