Skip to content

Instantly share code, notes, and snippets.

View katallaxie's full-sized avatar
👨‍💻
Staying hungry. Staying foolish.

Sebastian Döll katallaxie

👨‍💻
Staying hungry. Staying foolish.
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active November 20, 2026 06:26
microgpt
"""
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
@majest
majest / main.go
Last active October 10, 2026 19:30
Sqlite with GORM using UUID
package main
import (
"database/sql"
sqliteGo "github.com/mattn/go-sqlite3"
uuid "github.com/satori/go.uuid"
log "github.com/sirupsen/logrus"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"gorm.io/gorm/logger"
@g0rdan
g0rdan / terminator.sh
Last active July 8, 2025 13:43
Ultimate Flutter cleaning
#!/bin/bash
echo "flutter clean ..."
flutter clean
echo "Deleting .flutter-plugins ..."
rm -rf .flutter-plugins
echo "Deleting .packages ..."
rm -rf .packages
echo "Deleting .symlinks ..."
rm -rf ios/.symlinks/

CockroachDB and Docker Compose

This is the first in a series of tutorials on CockroachDB and Docker Compose

  • Information on CockroachDB can be found here.
  • Information on Docker Compose can be found here
  1. Install Docker Desktop

Because we already have an official CockroachDB docker image, we will use that in our docker-compose.yml file. We recommend you use one of the current tags instead of latest.

@matthewhartstonge
matthewhartstonge / httpstatus.proto
Last active May 28, 2021 08:58
HTTP Status Codes as protobuf/gRPC enums
// HTTPStatusCode provides all the known HTTP status codes. Since these codes
// are well known, it makes sense to use them as an easy way to detect, over
// the wire, if a message has been malformed, errors have happened or processed
// correctly.
enum StatusCode {
StatusCode_UNSPECIFIED = 0;
StatusCode_CONTINUE = 100;
StatusCode_SWITCHING_PROTOCOLS = 101;
StatusCode_PROCESSING = 102;
@katallaxie
katallaxie / avahi-daemon.conf
Last active September 28, 2020 13:28
Have HomeKit in VLAN's on LEDE
# install avahi
# to configure servce
[server]
allow-interfaces=br-<private-network>,br-<iot-network>
use-ipv4=yes
use-ipv6=no
allow-interfaces=br-lan,br-machina
check-response-ttl=no
use-iff-running=no
cache-entries-max=0
@JoeUX
JoeUX / compile-nginx.sh
Last active June 29, 2024 12:58 — forked from tollmanz/compile-nginx.sh
Optimized nginx compilation flags for modern CPUs, faster math, and LTO. This should be much faster than vanilla nginx builds. Still testing.
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN. I updated this block to get the latest 1.0.2h release. It's critical that OpenSSL be up to date.
@leonardofed
leonardofed / README.md
Last active November 16, 2026 19:38
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.


import { Injectable } from "@angular/core";
import { Store } from "@ngrx/store";
import { StoreService } from "./store-service.ts"
import { myReducer, IMyState, } from "./reducer.ts"
@Injectable()
export class SomeService {
constructor(private store: Store<any>, storeService: StoreService) {
// Add the service specific reducers to the set of existing reducers.
storeService.addReducers({myReducer});
@katallaxie
katallaxie / gist:6013dada2897cc603487
Created January 7, 2016 14:52
Rebootable and faster OpenWRT on RouterBoard RB2011
# reboot
rbcfg set boot_device nand
rbcfg set boot_protocol dhcp
rbcfg set booter backup
# and to be fast
rbcfg set cpu_mode regular
# have it applied
rbcfg apply