Skip to content

Instantly share code, notes, and snippets.

View daviddahl's full-sized avatar
💭
burning the midnight oil

David Dahl daviddahl

💭
burning the midnight oil
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active May 4, 2024 21:03
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

@doctorzhivago
doctorzhivago / manage-db.js
Last active May 13, 2021 00:54
Establish an IPNS name that points to a file containing an OrbitDB address
const createClient = require('ipfs-http-client');
const OrbitDB = require('orbit-db');
require('buffer');
const toBuffer = require('it-to-buffer');
const LOG='orbit*';
// NOTE: This runs via node.js 14.x +
// This was only tested with a go-ipfs node running on the same
// device on port 5001
@emptyfuel
emptyfuel / UTTypeiOS14.swift
Last active December 24, 2023 15:38
Using UTType in Swift in Xcode 12 and iOS 14 related code from blog post on emptytheory.com at https://emptytheory.com/2020/09/29/better-uniform-type-identifiers-with-xcode-12/
//https://emptytheory.com/2020/09/29/better-uniform-type-identifiers-with-xcode-12/
import UniformTypeIdentifiers
//Show UTType properties for built-in type
UTType.pdf.printInfo()
//Show properties for looked up type
UTType.word.printInfo()
@djrobstep
djrobstep / orm.py
Last active January 28, 2022 17:32
orm.py: An ORM for the ORM haters
import inspect
import pprint
import textwrap
from collections.abc import Iterable
from dataclasses import asdict
from dataclasses import field as dataclass_field
from dataclasses import fields as dataclass_fields
from dataclasses import make_dataclass
import results
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------
@jimpick
jimpick / proof.json
Created October 31, 2018 17:36
ipfs-social-proof jimpick
{
"handle": "Jim Pick",
"ipfsId": "QmX7S4KLxVfhMT7BwsyA2GkKfWD7LPHgPdK75pzErgqBWG",
"proof": {
"message": {
"statement": "I am @jimpick on github.com",
"username": "@jimpick",
"service": "github.com"
},
"timestamp": 1541007329378,
@woowa-hsw0
woowa-hsw0 / assume_role.sh
Last active January 11, 2023 11:36
Start AWS CLI Session with MFA Enabled (+Yubikey)
#!/bin/bash
set -eu
umask 0022
if [[ $# -lt 1 ]]; then
echo "Usage: $0 role_name [AWS ACCOUNT NUMBER]" >&2
exit 1
fi
@tcnksm
tcnksm / NOTE.md
Last active April 13, 2024 21:28
Small note of gRPC Best Practice @ CoreOSFest 2017
@dantheman213
dantheman213 / export_db_structure.sh
Last active March 5, 2024 02:55
Batch backup and export your Postgres or PostgreSQL table schemas and stored functions or procedures into individual *.sql files --the easy way!
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Export your app's table schemas and stored functions from a PostgreSQL
# database into individual *.sql files for easy management and source control.
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter