Skip to content

Instantly share code, notes, and snippets.

View neumachen's full-sized avatar
🏠
Working from home

Kareem H neumachen

🏠
Working from home
  • Bergen, Norway
  • 05:17 (UTC -12:00)
View GitHub Profile
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active April 23, 2025 08:47
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@jordansissel
jordansissel / FZF Examples.md
Last active February 14, 2021 22:42
FZF usage examples

GKE

Get credentials for a given GKE cluster

gcloud container clusters get-credentials $(gcloud container clusters list --format json | jq -r '.[] | "\(.name) --zone \(.location)"' | fzf --height 10 --sync)

Kubernetes

@ik5
ik5 / custom_json_unmarshal.go
Last active April 15, 2025 13:27
Example of custom unmarshal of JSON in golang
package main
import (
"encoding/json"
"fmt"
"reflect"
)
type To []string
@sainnhe
sainnhe / lightline-and-tmux-config.md
Last active October 29, 2024 14:35
Sexy & Powerful Configuration for Lightline and Tmux

𝑺𝒆𝒙𝒚 & 𝑷𝒐𝒘𝒆𝒓𝒇𝒖𝒍 𝑪𝒐𝒏𝒇𝒊𝒈𝒖𝒓𝒂𝒕𝒊𝒐𝒏 𝒇𝒐𝒓 𝑳𝒊𝒈𝒉𝒕𝒍𝒊𝒏𝒆 𝒂𝒏𝒅 𝑻𝒎𝒖𝒙

Nerd Font

First of all, install a nerd font, and apply it: nerd font

@smo0z
smo0z / ProtonLaunch.sh
Last active November 30, 2024 07:20
Proton Launch Script
#!/bin/sh
# Application path
APP_PATH="$(dirname "${BASH_SOURCE[0]}")"
cd "$APP_PATH"
# Executable file
APP_EXEC="$APP_PATH/.exe"
# Steam / IDs
@ricardomiguelfaria
ricardomiguelfaria / backup_all_docker_images.sh
Last active August 11, 2023 20:24 — forked from dieterrosch/backup_all_docker_images.sh
A bash script to backup all docker images to files
#!/usr/bin/sh
if [[ $# -eq 0 ]]; then
echo "Usage: $0 <backup_dir>"
exit
fi
destination=$1
if ! type "pv" > /dev/null; then
echo 'pv' command not found on your system, install it to get a nice progress indicator...
else
@jonlabelle
jonlabelle / docker_compose_cheatsheet.md
Last active April 15, 2025 21:21
Docker Compose Cheatsheet
@shiny-eel
shiny-eel / ExemplarSolution.java
Last active March 14, 2021 04:32
[Meeting Merger] Meetings have a start and end time. Merge those that crossover with each other. #interviewcake
public static List<Meeting> mergeRanges(List<Meeting> meetings) {
// make a copy so we don't destroy the input
List<Meeting> sortedMeetings = new ArrayList<>();
for (Meeting meeting: meetings) {
Meeting meetingCopy = new Meeting(meeting.getStartTime(), meeting.getEndTime());
sortedMeetings.add(meetingCopy);
}
// sort by start time
@miguelmota
miguelmota / nil_check.go
Created February 1, 2019 20:21
Golang check if interface value is nil
package main
import (
"fmt"
"reflect"
)
func main() {
var v *string
fmt.Println(isNil(v)) // true
@nealey
nealey / docker-tags.sh
Last active October 28, 2022 03:08 — forked from robv8r/docker_tags.sh
List Docker Image Tags using Bourne shell (including Bash)
#! /bin/sh
image="$1"; shift
if [ -z "$image" ] || [ "$image" == "--help" ]; then
echo "Usage: $0 IMAGE"
echo
echo "Prints all tags associated with IMAGE in a docker repository"
exit 1
fi