Skip to content

Instantly share code, notes, and snippets.

@nat-418
nat-418 / why-tcl.md
Last active April 1, 2024 03:23
Why Tcl?

Why Tcl?

Introduction

I use [Tcl] as my scripting language of choice, and recently someone asked me why. This article is an attempt to answer that question.

Ousterhout's dichotomy claims that there are two general categories of programming languages:

@pangyuteng
pangyuteng / README.md
Last active February 8, 2024 16:16
setting up Dell Poweredge R720 + Nvidia Tesla P40 24GB
  Dell Poweredge R720
  Nvidia Tesla P40 24GB 
  GPU pass-through via Proxmox

psu

  • ? am using only one 1100w psu, the other 1100w is not plugged in.
@jmatsushita
jmatsushita / README
Last active April 28, 2024 14:42
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.
@kralicky
kralicky / harvester-gpu.md
Last active May 1, 2024 15:49
Harvester GPU Provisioning

Harvester GPU Provisioning

  1. Install Harvester, then SSH into the server.

  2. Edit /boot/grub/grub.cfg as follows:

 set default=0
 set timeout=10
 
@WietseWind
WietseWind / racadm.bash
Last active April 10, 2024 15:03
Install racadm on Ubuntu 20.04 / 18.04
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-cmpi-devel/libcmpicppimpl0_2.0.3-0ubuntu2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/multiverse/s/sblim-sfcb/sfcb_1.4.9-0ubuntu5_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-sfc-common/libsfcutil0_1.0.1-0ubuntu4_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/multiverse/c/cim-schema/cim-schema_2.48.0-0ubuntu1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/openwsman_2.6.5-0ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-sfcc/libcimcclient0_2.2.8-0ubuntu2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-server1_2.6.5-0ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman1_2.6.5-0ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-client4_2.6.5-0ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-curl-client-trans
@UrsaDK
UrsaDK / Caching multi-stage builds in GA.md
Last active March 28, 2024 07:16
Speed up your multistage builds in GitHub Actions

Caching multi-stage builds in GitHub Actions

Caching Docker builds in GitHub Actions is an excellent article by @dtinth which analyses various strategies for speeding up builds in GitHub Actions. The upshot of the article is a fairly decisive conclusion that the best two ways to improve build times are:

  1. Build images via a standard docker build command, while using GitHub Packages' Docker registry as a cache = Longer initial build but fastest re-build times.

  2. Build your images via docker integrated BuildKit (DOCKER_BUILDKIT=1 docker build), while using a local registry and actions/cache to persist build caches = Fastest initial build but slightly longer re-build times.

The problem

@KelSolaar
KelSolaar / inkscape.py
Last active October 10, 2021 06:42
Inkscape - macOs - Absolute Path Wrapper
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Inkscape - macOs - Absolute Path Wrapper
========================================
On *macOs*, *Inkscape* requires absolute paths to work::
https://answers.launchpad.net/inkscape/+question/280575
@borkmann
borkmann / micro-k8s-setup.md
Last active December 24, 2023 08:01 — forked from joestringer/micro-k8s-setup.md
MicroK8s 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 version of docker for the kubernetes runtime, so if you have an existing docker installation then this may be confusing, for instance when building images the image may be stored with one of these installations and not the other. This guide assumes you will run both docker daemon instances, and use your existing docker-ce for building Cilium while using the microk8s.docker daemon instance for the runtime of your kubernetes pods.

Requirements

@andyrbell
andyrbell / scanner.sh
Last active April 5, 2024 09:01
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@lminiero
lminiero / astricon.lua
Last active November 27, 2020 22:49
Janus Lua script for the Astricon 2017 Dangerous Demo
-- This is the Astricon Dangerous Demo application logic built in Lua,
-- and conceived to be used in conjunction with the janus_lua.c plugin.
-- It only uses data channels, and expects commands to control the ARI.
--
-- Note: this example depends on lua-json to do JSON processing
-- (http://luaforge.net/projects/luajson/) and on lua-http for HTTP
-- requests (https://daurnimator.github.io/lua-http/)
json = require('json')
-- Example details