Skip to content

Instantly share code, notes, and snippets.

@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

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]}
@ssrihari
ssrihari / clojure-learning-list.md
Last active May 3, 2024 12:57
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@mikemunsie
mikemunsie / phoneMasks.json
Last active April 29, 2024 17:19
Phone Masks by Country Code JSON
{
"AC": "+247-####",
"AD": "+376-###-###",
"AE": "+971-5#-###-####",
"AE": "+971-#-###-####",
"AF": "+93-##-###-####",
"AG": "+1(268)###-####",
"AI": "+1(264)###-####",
"AL": "+355(###)###-###",
"AM": "+374-##-###-###",
@astreknet
astreknet / OpenBSD_on_Apple_M2_QEMU.md
Last active April 11, 2024 08:39
OpenBSD on Apple M2 with QEMU

OpenBSD on Apple M2 with QEMU

Minimalist installation of OpenBSD on the Apple M2 using QEMU

Ingredients

Installation

  1. install QEMU with Homebrew brew install qemu, also possible with MacPorts
  2. Write a script with execute permissions chmod +x qemu_aarch64_install_openbsd.sh for installing the image.
@thacoon
thacoon / arch-linux-gnome-install
Last active March 22, 2024 06:48
Install a minimal gnome setup and some more useful things
# Install Gnome and some other useful thins
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# And based on https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger
# I have just copied commands from https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger#Weitere_notwendige_Dienste
# It's just to have it with one view after doing a [fresh installation](https://gist.github.com/thacoon/05d5a39606ab554455d6713e8a714b2c)
# Some useful services
pacman -S acpid ntp dbus cups cronie
@scottstanfield
scottstanfield / .zshrc
Last active March 19, 2024 08:33
sensible, minimal .zshrc
# Sensible, short .zshrc
# Gist page: git.io/vSBRk
# Raw file: curl -L git.io/sensible-zshrc
# GNU and BSD (macOS) ls flags aren't compatible
ls --version &>/dev/null
if [ $? -eq 0 ]; then
lsflags="--color --group-directories-first -F"
else
lsflags="-GF"
@mbodo
mbodo / Linux - Systemd cheatsheet.md
Last active March 15, 2024 18:25
Systemd cheatsheet

Linux - Systemd cheatsheet

systemctl

Activates a service immediately:

systemctl start foo.service

Deactivates a service immediately: