Universal Blue Kinoite or: How I Learned to Stop Worrying and Love the Immutable Linux Desktop & Flatpaks updated 04/30/23
~Written with love & mostly on my "Steam Desk" Steam Deck + Steam Deck Dock on my 4k TV on my beanbag.
updated 04/30/23
~Written with love & mostly on my "Steam Desk" Steam Deck + Steam Deck Dock on my 4k TV on my beanbag.
%YAML 1.2 | |
--- | |
# Highlight regular git commits, merge commits, and tags. | |
name: Git Commit | |
file_extensions: | |
- COMMIT_EDITMSG | |
- MERGE_MSG | |
- TAG_EDITMSG | |
scope: text.git.commit |
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |
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
#!/bin/sh | |
branch="$(git rev-parse --abbrev-ref HEAD)" | |
# get computer name to append in Chime message | |
username=$USER | |
# a branch name where you want to prevent git push. In this case, it's "master" | |
if [ "$branch" = "master" ]; then | |
echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup |
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B) | |
set -g prefix C-space | |
unbind-key C-b | |
bind-key C-space send-prefix | |
# Set new panes to open in current directory | |
bind c new-window -c "#{pane_current_path}" | |
bind '"' split-window -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" |
Producer | |
Setup | |
bin/kafka-topics.sh --zookeeper localhost:2181/kafka-local --create --topic test-rep-one --partitions 6 --replication-factor 1 | |
bin/kafka-topics.sh --zookeeper localhost:2181/kafka-local --create --topic test-rep-two --partitions 6 --replication-factor 3 | |
Single thread, no replication | |
bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-one --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=kafka_host:9092 buffer.memory=67108864 batch.size=8196 | |
Single-thread, async 3x replication |
#!/usr/bin/env bash | |
# Example: | |
# ./find-ecr-image.sh foo/bar mytag | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: $( basename $0 ) <repository-name> <image-tag>" | |
exit 1 | |
fi | |
IMAGE_META="$( aws ecr describe-images --repository-name=$1 --image-ids=imageTag=$2 2> /dev/null )" |
base: | |
dbserver: | |
- postgres-overrides |