Skip to content

Instantly share code, notes, and snippets.

@veekaybee
veekaybee / normcore-llm.md
Last active May 23, 2024 03:28
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

//PEAK_VALLEY APPROACH
class Solution {
public:
int maxProfit(vector<int>& prices) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n = prices.size();
@flowchartsman
flowchartsman / start.md
Last active July 19, 2022 13:51
Zero To Go

Intro

This is an experiment in self-teaching Go, starting from complete unfamiliarity with the language. The goal is to provide a step-by-step educational resource that you can follow at your own pace, where each phase effectively builds on that which came before it with as little unnecessary overlap as possible. It's very much a "living document" or work in progress, and will likely be under constant revision as I revisit advice, update sources, tweak ordering and learn more about how these resources interact to create a well-rounded knowledge of the language. Please feel free to issue feedback and make any suggestions you feel are pertinent.

Reading

  1. Go through the tour at https://tour.golang.org/list
  2. Promptly abandon all of those plans you have to use channels everywhere
  3. Read the language spec once over: https://golang.org/ref/spec
  4. https://dave.cheney.net/2017/04/26/understand-go-pointers-in-less-than-800-words-or-your-money-back
  5. Read Effective Go: https://golang.org/doc/effective_go.htm
@joestringer
joestringer / micro-k8s-setup.md
Last active April 20, 2021 17:06
MicroK8s development environment setup for Cilium

Set up microk8s with Cilium for development

Microk8s is a Canonical project to provide a kubernetes environment for local development, similar to minikube but without requiring a separate VM to manage. These instructions describe setting it up for common development use cases with Cilium and may be helpful in particular for testing BPF kernel extensions with Cilium.

Microk8s will run its own containerd runtime, which may be initially confusing when building containers locally with docker. This guide assumes that you will use docker locally for building containers, and push these into a microk8s registry for use by containerd in the microk8s environment.

This guide works with MicroK8s 1.14 or above, with containerd. If you are running an earlier version, see the previous instructions.

Requirements

@mholt
mholt / macapp.go
Last active May 11, 2024 18:15
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@yitong-ovo
yitong-ovo / get_latest_brdc.sh
Last active December 11, 2021 16:47
get latest GPS broadcast ephemeris file (brdc) and uncompress. 获取并解压最新的 brdc 文件。
#!/bin/bash
set -eu
## get Current year
current_year=$(date +%Y)
## get latest version
latest_version=$(wget -qO- "ftp://cddis.gsfc.nasa.gov/gnss/data/daily/$current_year/brdc/" | awk -F'/brdc*/' '/brdc*/{print $2}' | cut -d\" -f1 | grep -v '\index.html' | tail -1)
## download
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"

Meltdown fix impact on Redis performances in virtualized environments

UPDATE: apparently kernel difference may have a serious impact, so I'll redo the test from scratch.

Test performed with AOF enabled, fsync policy 1 second, allowing the rewrites to be triggered.

Command lines used:

@t4sk
t4sk / a-usage.md
Last active December 19, 2023 18:17
gen_tcp and GenServer example in Elixir (1.5.2)

gen_tcp and GenServer example in Elixir (1.5.2)

Usage

server.ex

Server.start
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian