Skip to content

Instantly share code, notes, and snippets.

View cig0's full-sized avatar

Martín Cigorraga cig0

View GitHub Profile
@Eeyoresyndrome
Eeyoresyndrome / ublu38.md
Last active April 8, 2024 04:03
Universal Blue Kinoite or: How I Learned to Stop Worrying and Love the Immutable Desktop & Flatpak

Eeyore_Syndrome Presents:

Fedora Kinoite ublu.it Flathub

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.

TLDR: How to get an Immutable Fedora KDE Plasma Desktop setup for gaming on Linux. Brought to you by Universal Blue Project.


💬 It's (not just) Fedora Kinoite/ Fedora Silverblue with extra steps!

@MormonJesus69420
MormonJesus69420 / GitCommit.sublime-syntax
Created July 27, 2021 07:06
Syntax file for SublimeMerge
%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

ZSH CheatSheet

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.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@voidIess
voidIess / nix_env_unstable_guide.md
Last active February 24, 2024 15:19
Adding the nix unstable channel

Using the nipkgs unstable channel

Motivation

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.

What are nix channels?

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.

What is the nix unstable channel?

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

@kalpeshsingh
kalpeshsingh / pre-push
Last active April 26, 2024 04:31
A pre-push git hook that notify Amazon Chime group
#!/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
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 10, 2024 06:00
set -e, -u, -o, -x pipefail explanation
@william8th
william8th / .tmux.conf
Last active April 30, 2024 17:03
Tmux open new pane in same directory
# 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}"
@zodvik
zodvik / benchmark-commands.txt
Last active December 18, 2022 12:45
Kafka (1.0.0) Benchmark Commands
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
@outofcoffee
outofcoffee / find-ecr-image.sh
Last active March 1, 2024 13:35
Check if Docker image exists with tag in AWS ECR
#!/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 )"
anonymous
anonymous / top.sls
Created September 26, 2017 16:55
base:
dbserver:
- postgres-overrides