Skip to content

Instantly share code, notes, and snippets.

View Avery2's full-sized avatar

Avery Chan Avery2

View GitHub Profile
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 1, 2024 03:05
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

public static final String ANSI_RESET = "\u001B[0m";
public static final String ANSI_BLACK = "\u001B[30m";
public static final String ANSI_RED = "\u001B[31m";
public static final String ANSI_GREEN = "\u001B[32m";
public static final String ANSI_LIGHT_YELLOW = "\u001B[93m";
public static final String ANSI_YELLOW = "\u001B[33m";
public static final String ANSI_YELLOW_BACKGROUND = "\u001B[43m";
public static final String ANSI_BLUE = "\u001B[34m";
public static final String ANSI_PURPLE = "\u001B[35m";
public static final String ANSI_CYAN = "\u001B[36m";
@squarism
squarism / iterm2.md
Last active May 30, 2024 14:42
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@korya
korya / Subfolder to git repo.md
Last active December 16, 2023 10:29
Convert subfolder into Git submodule
@Morse-Code
Morse-Code / removeNonAlphaNum.c
Created April 4, 2013 12:41
Remove non-alphanumeric characters from a C string.
void stringRemoveNonAlphaNum(char *str)
{
unsigned long i = 0;
unsigned long j = 0;
char c;
while ((c = str[i++]) != '\0')
{
if (isalnum(c))
{