Skip to content

Instantly share code, notes, and snippets.

# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host cells
HostName ec2-34-224-90-52.compute-1.amazonaws.com
User ubuntu
IdentityFile ~/.ssh/mac-arm.pem
IdentitiesOnly yes
ForwardAgent yes
@bronifty
bronifty / launch.json
Created March 19, 2025 20:25
launch.json debug config
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug local file with tsx",
"runtimeExecutable": "npx",
"runtimeArgs": ["tsx"],
"args": ["${relativeFile}"],
@bronifty
bronifty / bash_profile
Last active August 13, 2025 22:52
bash_profile
echo "~/.bash_profile"
# Set a basic PATH
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
# Function to add to PATH only if not already there
add_to_path() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
export PATH="$PATH:$1"
fi
@bronifty
bronifty / xor.cpp
Created November 30, 2024 00:38
xor.cpp
#include <iostream>
#include <bitset>
#include <string>
using namespace std;
bitset<8> calcBitset(int x){
return bitset<8>(x);
}
void logBitset(string var, int x){
cout << var << ": " << bitset<8>(x) << " (" << x << ")" << endl;
- make sure your editor window is in the root of your single project flush with the package.json
```sh
fnm install 22
fnm default 22
corepack enable
corepack prepare pnpm@latest --activate
pnpm add -D tsx
```
```json
export { root, __dirname };
// https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-when-using-the-experimental-modules-flag/50052194#50052194
import { dirname } from "path";
import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));
const root = `${__dirname}/..`;
import { useSyncExternalStore } from 'react'
/**
* This will call the given callback function whenever the contents of the map
* change.
*/
class ObservableMap extends Map {
constructor(entries) {
super(entries)
this.listeners = new Set()
#!/bin/bash
# bash variables
export NATS_SERVER_VERSION="2.10.9"
export NATS_CLI_VERSION="0.1.1"
export GOLANG_VERSION="1.21.6"
export ARCH="$(uname -m)"
# Update and install necessary packages without interactive prompts
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y git unzip wget lsof build-essential gnupg software-properties-common python3-pip snapd
@bronifty
bronifty / git-cache-reset
Last active February 2, 2024 15:39
git cache reset
git credential-cache exit
sudo chown bronifty:staff /Users/bronifty/.ssh/id_rsa
sudo chown bronifty:staff /Users/bronifty/.ssh/id_rsa.pub
@bronifty
bronifty / README.md
Created October 14, 2023 20:46 — forked from tannerlinsley/README.md
Replacing Create React App with the Next.js CLI

Replacing Create React App with the Next.js CLI

How dare you make a jab at Create React App!?

Firstly, Create React App is good. But it's a very rigid CLI, primarily designed for projects that require very little to no configuration. This makes it great for beginners and simple projects but unfortunately, this means that it's pretty non-extensible. Despite the involvement from big names and a ton of great devs, it has left me wanting a much better developer experience with a lot more polish when it comes to hot reloading, babel configuration, webpack configuration, etc. It's definitely simple and good, but not amazing.

Now, compare that experience to Next.js which for starters has a much larger team behind it provided by a world-class company (Vercel) who are all financially dedicated to making it the best DX you could imagine to build any React application. Next.js is the 💣-diggity. It has amazing docs, great support, can grow with your requirements into SSR or static site generation, etc.

So why