Skip to content

Instantly share code, notes, and snippets.

View arn4v's full-sized avatar
🚀
Building things in my bedroom

Arnav Gosain arn4v

🚀
Building things in my bedroom
View GitHub Profile
@pesterhazy
pesterhazy / building-sync-systems.md
Last active July 4, 2024 02:15
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

import { isTest } from "@/lib/constants";
import { Dialog } from "@headlessui/react";
import { motion } from "framer-motion";
const TRANSITIONS = {
DURATION: !isTest ? 0.5 : 0,
EASE: [0.32, 0.72, 0, 1],
};
function Modal({ onClose = () => {}, initialFocusRef, children }) {
@mcrumm
mcrumm / phx_sqlite_fly_launch.md
Last active May 3, 2024 09:38
Phoenix + SQLite Deployment tips

Deploying to Fly.io with SQLite

Deploying a Phoenix app to Fly.io is a breeze...is what everyone kept telling me. In fairness, I imagine the process would have been breezier had I just used postgres, but all the sqlite and litestream talk has been far too intriguing to ignore. "Wait", you say. "It is just a flat file. How much harder can it be?"

It is easy to make something harder than it should be. It is hard to take something complex and make it truly simple. flyctl launch does an amazing job at providing a simple interface to the utterly complex task of generating deployment resources, especially now that we are living in a containerd (erm, firecracker) world.

This gist is for anyone who, like me, thinks they know better than to read all of the documentation and therefore necessari

@LewisGaul
LewisGaul / zig-blog-posts.md
Last active May 27, 2024 01:09
Collection of blog posts about the Zig programming language
@MrSquaare
MrSquaare / github-labels-delete.js
Created October 28, 2020 17:26
Delete all labels of a GitHub repository
let windowConfirm = window.confirm
let selector = `form.js-delete-label`
window.confirm = function () {
return true
}
document.querySelectorAll(selector).forEach(deleteForm => {
let submitButton = deleteForm.querySelector(`button[type="submit"]`)
@evancloutier
evancloutier / _app.tsx
Created October 23, 2020 18:27
Cookie Based Authentication in NextJS Application
const App: NextPage<Props> = ({ prop }) => {
const [{ authenticated, loading }, dispatch] = useReducer(
AuthenticationReducer,
{
authenticated: false,
loading: true,
}
);
useEffect(() => {
@jcowles
jcowles / MachineLearningResources.md
Last active November 9, 2023 09:56
Machine learning resources

"AI is the new Electricity"

Andrew Ng lecture, Stanford Graduate School of Business
High level, but totally worth watching.
https://www.youtube.com/watch?v=21EiKfQYZXc

Stanford cs231n, winter 2016

I went looking for lectures from different sources and these are a great "from first principles" introduction. The newer cs231n lectures may have more relevant details, but I like Andrej Karpathy's

@parmentf
parmentf / GitCommitEmoji.md
Last active July 4, 2024 10:57
Git Commit message Emoji