set $req_header "";
set $resp_header "";
header_filter_by_lua_block{
local h = ngx.req.get_headers();
for k, v in pairs(h) do
ngx.var.req_header = ngx.var.req_header .. k.."="..v.." ";
-- vim: tabstop=2 shiftwidth=2 expandtab | |
-- We almost always start by importing the wezterm module | |
local wezterm = require 'wezterm' | |
-- Define a lua table to hold _our_ module's functions | |
local module = {} | |
-- Returns a bool based on whether the host operating system's | |
-- appearance is light or dark. | |
function module.is_dark() |
There a times when you need to build something from the nix unstable channel. For example the master contains a new package you need, but the next nixpkgs release is somewhere in the future, and you need this package now. In this guide I want to show how to install packages from unstable by using nix-env. Furthermore I hope to give a basic understanding of the channels concept.
A channel is a set of expressions which includes severall build, installation and configuration instructions for packages, services and the system itself. The repository normaly used here is nixpkgs. It is developed at https://github.com/NixOS/nixpkgs.
The unstable channel is a copy of the NixOS/nixpkgs master. It is pulled from github once in a while and will be available from a mirror under https://nixos.org/channels/nixpkgs-unstable. Since NixOS uses half-anual released stable channels, some changes (especially new f
import cats.Traverse | |
import cats.effect._ | |
import cats.effect.concurrent.Semaphore | |
import cats.temp.par._ | |
import cats.syntax.all._ | |
import scala.concurrent.duration._ | |
object Main extends IOApp { | |
import ParTask._ |
### | |
### [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. |
import cats.effect.std.{Dispatcher, Queue} | |
import cats.effect.{IO, IOApp} | |
import com.typesafe.scalalogging.Logger | |
import fs2.{Pipe, Stream} | |
import java.util.concurrent.atomic.AtomicInteger | |
import scala.collection.mutable | |
import scala.concurrent.duration.DurationInt | |
object Subscriptions { |
// scalaVersion := "3.2.0" | |
// libraryDependencies ++= Seq( | |
// libraryDependencies ++= Seq( | |
// "org.typelevel" %% "cats-core" % "2.8.0", | |
// "dev.zio" %% "zio" % "2.0.0", | |
// "org.typelevel" %% "cats-effect" % "3.3.14", | |
// "org.typelevel" %% "kittens" % "3.0.0", | |
// "dev.zio" %% "zio-json" % "0.3.0-RC10", | |
// "io.d11" %% "zhttp" % "2.0.0-RC10" | |
// ) |
- socat
kubectl
with proper~/.kube/config
that can connect to your cluster- Working knowledge of
kubectl
client - OpenSSH client
kubectl
does port forwarding tosshd
port of your pod. I'm usingpm2
process managed to keep my services alive in my workstation container. If you have onlysshd
, easiest to use isdropbear
ProxyCommand
of OpenSSH client usessocat
to redirect two wayfd
-
to forwarded port ofkubectl
- Voila! You are in
# Example YAML configuration for the sidecar pattern. | |
# It defines a main application container which writes | |
# the current date to a log file every five seconds. | |
# The sidecar container is nginx serving that log file. | |
# (In practice, your sidecar is likely to be a log collection | |
# container that uploads to external storage.) | |
# To run: |