Skip to content

Instantly share code, notes, and snippets.

View awill1988's full-sized avatar

Adam T. Williams awill1988

  • Bozeman, Montana
  • 16:52 (UTC -06:00)
View GitHub Profile
@ZaxR
ZaxR / README.md
Last active November 22, 2021 23:43
Google Cloud Authentication for Docker

These instructions are to create a local, named Docker volume that stores authenticated Google service account credentials, for mounting to local Docker containers. This setup should only be required once, as the volume persists even after connected containers are stopped/removed.

TREAT THIS VOLUME AS CREDENTIALS. The volume stores sensitive information and should never leave your local machine.

Steps

  1. Create the service account credentials file to authenticate google services.
    This file should be saved in ~/.config/gcloud/ on Mac/Linux,
@ryuheechul
ryuheechul / Nix.md
Last active January 30, 2023 19:02
Personal micro wiki for nix(os)
@b01
b01 / download-vs-code-server.sh
Last active March 5, 2025 18:12
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
# Copyright 2023 Khalifah K. Shabazz
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the “Software”),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
@datakurre
datakurre / python-packages.nix
Last active October 14, 2022 04:52
"setup.nix" packaging example
# Generated by pip2nix 0.8.0.dev1
# See https://github.com/nix-community/pip2nix
{ pkgs, fetchurl, fetchgit, fetchhg }:
self: super: {
"Babel" = super.buildPythonPackage rec {
pname = "Babel";
version = "2.9.0";
src = fetchurl {
@ollieatkinson
ollieatkinson / SVG.swift
Last active May 20, 2025 14:08
Utilise the private CoreSVG framework in Swift
import Darwin
import Foundation
import UIKit
// https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS17.1.sdk/System/Library/PrivateFrameworks/CoreSVG.framework/CoreSVG.tbd
// https://developer.limneos.net/index.php?ios=17.1&framework=UIKitCore.framework&header=UIImage.h
@objc
class CGSVGDocument: NSObject { }
@jmatsushita
jmatsushita / README
Last active May 16, 2025 21:54
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places.
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of
###. things to watch out for:
### - Check out the `nix-darwin` instructions, as they have changed.
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026
###
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@bsag
bsag / README.md
Last active October 14, 2024 03:33
Selected files from my standalone Nix/Home Manager set up on macOS to illustrate the general approach

These files illustrate the way that I have set up Nix and Home Manager for standalone use on macOS on both an Intel and Apple Silicon machine, in case the examples are useful to anyone. Some of the configuration is separated out into separate files in configs/ which get imported in home.nix. Some of my existing dotfiles are placed in dotfiles/ and then symlinked in by Nix to the location that that the system expects to find them.

It is a work in progress so currently I am handling installation of R separately.

@ksexton
ksexton / README
Last active November 7, 2024 19:17 — forked from jmatsushita/README
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
# Inspired by https://github.com/malob/nixpkgs I highly recommend looking at malob's repo for a more thorough configuration
#
# Some people are coming directly to this Gist from search results and not the original post[1]. If that sounds like you, you should also know there is a video[2] that accompanies this.
#
# [1] https://discourse.nixos.org/t/simple-workable-config-for-m1-macbook-pro-monterey-12-0-1-with-nix-flakes-nix-darwin-and-home-manager/16834
# [2] https://www.youtube.com/watch?v=KJgN0lnA5mk
#
# Let's get started
@rain-1
rain-1 / LLM.md
Last active June 3, 2025 16:35
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.