Skip to content

Instantly share code, notes, and snippets.

View techouse's full-sized avatar
🏛️
Crash early. A dead program normally does a lot less damage than a crippled one.

Klemen Tusar techouse

🏛️
Crash early. A dead program normally does a lot less damage than a crippled one.
View GitHub Profile
@peterdemartini
peterdemartini / command.sh
Last active May 27, 2026 09:51
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 1, 2026 08:09
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

@rhukster
rhukster / sphp.sh
Last active January 6, 2026 10:00
Easy Brew PHP version switching (Now moved to https://github.com/rhukster/sphp.sh)
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
#
# >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh
# >>> Kept here for legacy purposes
#
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)
// On PhpStorm, when ussing with laravel mix, for Alias path resolving in components you have to:
// - create a webpack.config.js file separately like:
const path = require('path')
const webpack = require('webpack')
module.exports = {
...
resolve: {
extensions: ['.js', '.json', '.vue'],
@bitmvr
bitmvr / example--parse-semver-with-bash.sh
Last active August 5, 2025 18:03
A POSIX Compliant SemVer Parser in Pure Bash
#!/usr/bin/env bash
VERSION="${1#[vV]}"
VERSION_MAJOR="${VERSION%%.*}"
VERSION_MINOR_PATCH="${VERSION#*.}"
VERSION_MINOR="${VERSION_MINOR_PATCH%%.*}"
VERSION_PATCH_PRE_RELEASE="${VERSION_MINOR_PATCH#*.}"
VERSION_PATCH="${VERSION_PATCH_PRE_RELEASE%%[-+]*}"
VERSION_PRE_RELEASE=""
@seunggabi
seunggabi / semantic-branch-names.md
Last active March 10, 2026 18:45
Semantic Branch Names

Semantic Branch Names

See how a minor change to your branch name style can make you a better programmer.

Format: <type>/#<issueNumber>-<alias>

Example

@karansinghgit
karansinghgit / del_vscode_mac.md
Last active April 14, 2026 05:39
How to completely uninstall VSCode on Mac
  1. Close and Quit VSCode

  2. Remove VScode from Applications (just go to Finder -> Applications and move VSCode to Bin)

  3. Execute these commands in any order. The paths might be slightly different for you.

rm -fr ~/.vscode*
rm -fr ~/Library/Application\ Support/Code/

rm -fr ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/
rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist 
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp