Skip to content

Instantly share code, notes, and snippets.

View theneosloth's full-sized avatar

Stefan Kuznetsov theneosloth

View GitHub Profile
@gdamjan
gdamjan / README.md
Last active November 1, 2024 13:52 — forked from gdamjan-loka/README.md
Local Docker registry running in Kubernetes / k3s

Install a docker registry in a k3s kubernetes cluster

k3s doesn't have a builtin plugin for a local registry, so this is how to install the docker registry. The registry will be exposed via the default traefik ingress (on port 80 and 443).

Assumptions

  • resolvectl query registry.localhost returns 127.0.0.1 - on most Linux distros it does. If not, enable and configure systemd-resolved
  • K3s comes with traefik ingress controller by default, so the ingress for the registry service is configured for that.

Setting up qemu VM using nix flakes

Did you know that it is rather easy to setup a VM to test your NixOs configuration?

Create simple flake:

# flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
@digikar99
digikar99 / lisp-resources-digikar-2020.md
Last active September 10, 2024 08:40
If programming is more than just a means of getting things done for you, then Common Lisp is for you!
@tsuchm
tsuchm / buildah.yml
Created July 3, 2020 05:24
Ansible playbook to install buildah and podman
# https://github.com/containers/buildah/blob/master/install.md
- name: Add buildah repository key
apt_key:
url: https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key
state: present
- name: Enable buildah repository
apt_repository:
repo: deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /
@daviwil
daviwil / 003_1_initial_code.fs
Created August 26, 2016 14:03
Source code from Episode 003 of the_dev_aspect
//
// --------- Model ---------
//
type Details =
{ Name: string
Description: string }
type Item =
{ Details: Details }
#!/bin/bash
pip install "$1" 2>/dev/null
easy_install "$1" 2>/dev/null
brew install "$1" 2>/dev/null
npm install "$1" 2>/dev/null
yum install "$1" 2>/dev/null
dnf install "$1" 2>/dev/null
docker run "$1" 2>/dev/null
pkg install "$1" 2>/dev/null
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active November 14, 2024 15:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@rtt
rtt / tinder-api-documentation.md
Last active October 17, 2024 17:55
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active September 12, 2024 16:16
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@aras-p
aras-p / preprocessor_fun.h
Last active November 15, 2024 09:22
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,