Skip to content

Instantly share code, notes, and snippets.

alias rustc="~/.cargo/bin/rustc"
alias gl="git log --oneline --decorate --graph"
alias amend="git commit --amend"
alias pulldev="git checkout develop && git pull && git checkout -"
alias nom="npm"
alias got="git"
alias clear-local="git fetch -p && for branch in `git branch —vv grep ‘: gone]’ | awk ‘{print $1}’`; do git branch -D $branch; done"
alias oops="git reset --hard"
alias please="$(fc -ln -1)" # !!sudo
alias back="git checkout -"
@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active July 18, 2025 02:28
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@js-choi
js-choi / compact-unicode-character-names.md
Last active January 22, 2025 22:35
Compact Unicode character names

Concise Unicode character names in JavaScript

J. S. Choi, 2022

⚠️ Warning: This article is not finished. The code will not yet run without errors.

All programmers must manipulate text; JavaScript programmers are no exception. Text manipulation often refers to specific characters, usually by their code points in hexadecimal – or by embedding the characters directly in source code.

@nileshsimaria
nileshsimaria / docker-default-directory
Last active September 24, 2024 05:33
Change docker's default /var/lib/docker to different directory on Ubuntu
1. Take a backup of docker.service file.
$ cp /lib/systemd/system/docker.service /lib/systemd/system/docker.service.orig
2. Modify /lib/systemd/system/docker.service to tell docker to use our own directory
instead of default /var/lib/docker. In this example, I am using /p/var/lib/docker
Apply below patch.
$ diff -uP -N /lib/systemd/system/docker.service.orig /lib/systemd/system/docker.service
--- /lib/systemd/system/docker.service.orig 2018-12-05 21:24:20.544852391 -0800
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 22, 2025 07:36
set -e, -u, -o, -x pipefail explanation
@knowsuchagency
knowsuchagency / Dockerfile
Created July 16, 2018 05:08
Makefile Docker Git GitHub multi-stage build ssh private key recipe
FROM python:3 as build-system
RUN pip install -U pip
COPY requirements.txt requirements.txt
### create temporary image used to download and vendor packages using private key ###
FROM build-system as intermediate
# add credentials on build
@kantorkel
kantorkel / dankepolizei.go
Created July 12, 2017 11:51
danke polizei tweets.csv
anaconda.SetConsumerKey("asd")
anaconda.SetConsumerSecret("asdf")
api := anaconda.NewTwitterApi("asdfg", "asdfgh")
v := url.Values{}
v.Set("count", "30")
v.Set("result_type", "recent")
searchResult, _ := api.GetSearch("danke to:@PolizeiHamburg since:2017-07-12 until:2017-07-13", v)
@TrentSPalmer
TrentSPalmer / 2017-06-18-064710_722x410_scrot.png
Last active July 1, 2025 09:37
fish powerline on ubuntu the easy way
2017-06-18-064710_722x410_scrot.png
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active July 20, 2025 13:22
Hyperlinks in Terminal Emulators
@antoineMoPa
antoineMoPa / vector-field.py
Last active April 23, 2017 22:00
particles in a vector field
import numpy as np
import math
from PIL import Image
size = 400;
# nabla (or del operator)
# in this function, we approximate nabla(u)
# by looking at the neighbor pixels