Skip to content

Instantly share code, notes, and snippets.

View iamjaredwalters's full-sized avatar

Jared Walters iamjaredwalters

  • Los Angeles
View GitHub Profile
@iamjaredwalters
iamjaredwalters / ghostty-config
Last active May 8, 2025 20:49
ghostty config macos
bold-is-bright = true
macos-titlebar-style = native
quit-after-last-window-closed = true
font-family = GeistMono NFM
font-size = 14
theme = light:catppuccin-latte,dark:catppuccin-macchiato
window-colorspace = display-p3
@iamjaredwalters
iamjaredwalters / key-repeat.txt
Created July 13, 2024 00:02
Enable key repeat in Cursor
defaults write com.todesktop.230313mzl4w4u92 ApplePressAndHoldEnabled -bool false
@iamjaredwalters
iamjaredwalters / increase-key-repeat
Last active May 29, 2024 00:39
Increase key repeat rate MacOS
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
[
{
"key": "shift+ctrl+e",
"command": "actions.findWithSelection"
},
{
"key": "ctrl+e",
"command": "-actions.findWithSelection"
},
{
@iamjaredwalters
iamjaredwalters / starship.toml
Created May 22, 2024 23:30
Starship config using nerdfonts
# Inserts a blank line between shell prompts
add_newline = true
# Change command timeout from 500 to 1000 ms
command_timeout = 1000
# Change the default prompt format
# format = """$env_var $all"""
[line_break]
disabled = true
@iamjaredwalters
iamjaredwalters / docker-compose.yml
Created March 29, 2022 23:37
Simple NGINX reverse proxy docker
version: "3.8"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
restart: always
ports:
- 80:80
volumes:
@iamjaredwalters
iamjaredwalters / react-portal-single-child.js
Created August 17, 2021 15:31
Empty React Portal before creation
// By default, createPortal will append to the Portal if it already exists. This removes any previous children of the portal
// target before appending
// check if portal has any child nodes
if (portalRef && portalRef?.current?.hasChildNodes()) {
// get first child node
const {firstChild} = portalRef?.current;
// remove child node
portalRef?.current?.removeChild(firstChild);
}
@iamjaredwalters
iamjaredwalters / autosign-commit-git.sh
Last active December 23, 2020 22:18
Autosign commits with a gpg key
# Generate a new pgp key. Your key must be at least 4096 bits.
gpg --full-generate-key
# List current keys
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key
gpg --armor --export your_key_id
# your_key_id is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
// score: 100%
const solution = (A) => {
let answer = 1;
const arrAsc = A.sort((a, b) => a - b);
for (i = 0; i < A.length; i++) {
const curr = A[i];
if (curr < answer) {
continue;
@iamjaredwalters
iamjaredwalters / MaxCounters.js
Last active March 21, 2020 17:51
Codility lesson
// Detected time complexity: O(N*M)
const solution = (N, A) => {
// write your code in JavaScript (Node.js 8.9.4)
let max = 0;
// Create number of counters needed
let counters = Array(N).fill(0);
for (i = 0; i < A.length; i++) {