Skip to content

Instantly share code, notes, and snippets.

View yeargin2021's full-sized avatar

Tommy H. Yeargin, Jr. yeargin2021

View GitHub Profile
@yeargin2021
yeargin2021 / main.rs
Last active December 1, 2024 14:10
count to ten rust
fn main() {
let mut x = 1;
while x < 11 {
println!("{:02}.",x);
x+=1;
}
}
/*
Output:
fn main() {
println!("Welcome to Rust!");
}
@yeargin2021
yeargin2021 / python_guessing_game_1_to_10.py
Created November 16, 2024 08:24
A python guessing game. Guess between 1 and 10!
import random
def random_number():
return random.randint(1, 10)
my_random_number = random_number()
my_guess = int(input("Guess a number between 1 and 10: "))
while my_guess != my_random_number:
@yeargin2021
yeargin2021 / tmux-cheatsheet.markdown
Created July 21, 2024 16:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@yeargin2021
yeargin2021 / vscode-macos-context-menu.md
Created May 23, 2023 23:37 — forked from idleberg/vscode-macos-context-menu.md
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉