Skip to content

Instantly share code, notes, and snippets.

View corneliusroemer's full-sized avatar

Cornelius Roemer corneliusroemer

View GitHub Profile
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 2, 2024 15:55
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 2, 2024 06:57
set -e, -u, -o, -x pipefail explanation
@tuxfight3r
tuxfight3r / vim-shortcuts.md
Last active April 24, 2024 13:21
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@hofmannsven
hofmannsven / README.md
Created December 6, 2017 00:32
Increase key repeat rate on macOS

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.

Source: https://apple.stackexchange.com/a/83923

# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@raphlinus
raphlinus / not_too_clever.md
Created June 23, 2022 00:50
Translation of grugbrain.dev into English

The not-too-clever programmer

This is a translation of grugbrain.dev into clear English. All props to the original author.

Introduction

This is a collection of thoughts on software development, originally written by an pseudonymous author styling themselves the "grug brain developer," but then translated into clear English by Raph Levien.

I am not an extremely smart developer, but I have many years of experience and have learned some things, although still don't know everything.

@ssokolow
ssokolow / python_boilerplate.py
Created October 13, 2019 08:54
The raw/initial output from "boiler" in my ~/.vim/snippets/python.snippets
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""[application description here]"""
# Prevent Python 2.x PyLint from complaining if run on this
from __future__ import (absolute_import, division, print_function,
with_statement, unicode_literals)
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__appname__ = "[application name here]"
# Source: https://gist.github.com/84324e2d6eb1e62e3569846a741cedea
####################
# Create a Cluster #
####################
minikube start
#############################
# Deploy Ingress Controller #
@apalala
apalala / bench.py
Last active November 6, 2023 01:45
A simple Python benchmark
from __future__ import print_function
from math import sin, cos, radians
import timeit
'''
A simple Python benchmark.
Results on an overclocked AMD FX-8150 Eight-Core CPU @ 3.0 GHz, and
an Intel Core i5-2410M CPU @ 2.30GHz.
@tushortz
tushortz / UNICODE to ASCII python replace
Created April 6, 2016 22:14
Function to replace some annoying characters
def unicodetoascii(text):
TEXT = (text.
replace('\\xe2\\x80\\x99', "'").
replace('\\xc3\\xa9', 'e').
replace('\\xe2\\x80\\x90', '-').
replace('\\xe2\\x80\\x91', '-').
replace('\\xe2\\x80\\x92', '-').
replace('\\xe2\\x80\\x93', '-').
replace('\\xe2\\x80\\x94', '-').