Skip to content

Instantly share code, notes, and snippets.

View esmcelroy's full-sized avatar
🐢
responses may be slow here

Eric McElroy esmcelroy

🐢
responses may be slow here
View GitHub Profile
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@shadowandy
shadowandy / Setting up Kobo synchronisation with Calibre-Web and Nginx Proxy Manager (NPM).md
Last active February 23, 2026 18:54
Setting up Kobo synchronisation with Calibre-Web and Nginx Proxy Manager (NPM)

Introduction

This article guides you through the process of setting up the Nginx Proxy Manager (NPM) and Calibre-Web to allow collections and books to be synchronised to the Kobo e-reader. Other features like access to Kobo store, Overdrive, Google Drive and Dropbox will not be affected.

Important

  • What is articulate in the rest of this article is to enable public secured Internet accessible synchronisation endpoint for Kobo e-reader.
  • Calibre-Web presents book download endpoint as HTTP (non-HTTPS) with a port number. Other than the implicit understanding that HTTP and HTTP runs on port 80/tcp and 443/tcp respectively, it is not possible to have both HTTP and HTTPS running on the same port number (e.g., 20080/tcp).
  • Only EPUB formatted books can be synchronised. That is, other formats like PDF won't be synchronised due to restrictions on Kobo e-reader.
@Treeki
Treeki / TurnipPrices.cpp
Last active February 6, 2026 05:30
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@IanColdwater
IanColdwater / twittermute.txt
Last active March 8, 2026 00:11
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@markwragg
markwragg / mactweaks.md
Last active January 3, 2025 12:31
Mac tweaks

Changes to my Mac

Turn off "press and hold" for foreign letters, allowing you to then press and hold for repeat letters. Open Terminal and run:

defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false

Then you need to close/reopen any app before it takes effect.

Make the dock appear faster when using auto hide:

@Ryanb58
Ryanb58 / install.md
Last active December 31, 2025 20:22
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@jpswade
jpswade / devops_best_practices.md
Last active February 24, 2026 02:10
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing

#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@leonardofed
leonardofed / README.md
Last active February 17, 2026 14:40
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@joepie91
joepie91 / vpn.md
Last active March 11, 2026 18:55
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.