Skip to content

Instantly share code, notes, and snippets.

@diefans
diefans / tiltfiles-collection.md
Created January 20, 2024 14:56 — forked from rasheedamir/tiltfiles-collection.md
tiltfiles-collection
# note that helm tempates are converted into yaml and a kubectl apply is run on the yaml object, ie `helm ls` will not show anything

# TODO move these to config files
settings = {
  "start_kind": True,
  "preload_images_for_kind": True,
  "deploy_metallb": True,
  "deploy_ambassador_api": False,
  "deploy_ambassador_edge_gateway": False,
@diefans
diefans / kongwithingress.yaml
Created January 10, 2024 10:36 — forked from bgarcial/kongwithingress.yaml
Installing kong to work ingress on Kubernetes
apiVersion: v1
kind: Namespace
metadata:
name: kong
---
apiVersion: v1
kind: Secret
metadata:
@diefans
diefans / gnome_40_wayland_nvidia.nix
Created October 29, 2022 15:54 — forked from wochap/gnome_40_wayland_nvidia.nix
Nixos config for wayland and nvidia 470
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
let
# Get the last working revision with nvidia 460.x
nixos-unstable-pinned = import (builtins.fetchTarball {
name = "nixos-unstable_nvidia-x11-470.57.02";
@diefans
diefans / k3s_helm_install.sh
Created July 7, 2022 10:38 — forked from icebob/k3s_helm_install.sh
K3S + Helm installing
# Install K3S
curl -sfL https://get.k3s.io | sh -
# Copy k3s config
mkdir $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
sudo chmod 644 $HOME/.kube/config
# Check K3S
kubectl get pods -n kube-system
@diefans
diefans / nixos_python_patch_venv_bins.md
Created April 5, 2022 17:02 — forked from GuillaumeDesforges/nixos_python_patch_venv_bins.md
How to: make Python dependencies installed via pip work on NixOS

How to: make Python dependencies installed via pip work on NixOS

The issue

  • You are using NixOS
  • You start working on a Python project
  • You manage the dependencies in a classic Python virtual environment using pip or poetry

You won't be able to import some of those libraries.

@diefans
diefans / settings.lua
Created March 12, 2022 19:15 — forked from lalitmee/settings.lua
nvim settings
local fn = vim.fn
local api = vim.api
local executable = function(e)
return fn.executable(e) > 0
end
local opts_info = vim.api.nvim_get_all_options_info()
local opt = setmetatable(
{}, {
@diefans
diefans / sync-history.sh
Created September 24, 2021 10:10 — forked from jan-warchol/sync-history.sh
Synchronize history across bash sessions
# Synchronize history between bash sessions
#
# Make history from other terminals available to the current one. However,
# don't mix all histories together - make sure that *all* commands from the
# current session are on top of its history, so that pressing up arrow will
# give you most recent command from this session, not from any session.
#
# Since history is saved on each prompt, this additionally protects it from
# terminal crashes.
@diefans
diefans / my-nixos-installation.md
Created September 13, 2021 18:48
NixOS installation guide, tailored to my needs

Preface

This manual describes how to install, use and extend NixOS, a Linux distribution based on the purely functional package management system Nix, that is composed using modules and packages defined in the Nixpkgs project.

Installation

This section describes how to obtain, install, and configure NixOS for first-time use.

Obtaining NixOS

NixOS ISO images can be downloaded from the NixOS download page. There are a number of installation options. In this manual we will assume that the chosen option is Minimal ISO image (64bit). You can burn it on a USB stick with:

@diefans
diefans / nixos.md
Created September 13, 2021 18:18 — forked from martijnvermaat/nixos.md
Installation of NixOS with encrypted root
@diefans
diefans / mongo_registry.go
Created June 3, 2021 10:38 — forked from SupaHam/mongo_registry.go
mongo-go-driver UUID decoder & encoder for Golang
// This is a value (de|en)coder for the github.com/google/uuid UUID type. For best experience, register
// mongoRegistry to mongo client instance via options, e.g.
// clientOptions := options.Client().SetRegistry(mongoRegistry)
//
// Only BSON binary subtype 0x04 is supported.
//
// Use as you please
package repository
import (