Skip to content

Instantly share code, notes, and snippets.

View pepe's full-sized avatar

Josef Pospíšil pepe

View GitHub Profile
@willurd
willurd / web-servers.md
Last active April 26, 2024 18:00
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
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@ityonemo
ityonemo / test.md
Last active April 25, 2024 10:23
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@john2x
john2x / 00_destructuring.md
Last active April 23, 2024 13:18
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@yogthos
yogthos / clojure-beginner.md
Last active April 22, 2024 09:00
Clojure beginner resources

Introductory resources

@Jonarod
Jonarod / README.md
Last active April 20, 2024 19:27
Install Alpine Linux on Hetzner cloud
  1. Create an hetzner server using Ubuntu
  2. Go to the Hetzner's Server dashboard > Images
  3. Click on "Mount" over the alpine-linux-extended.iso image
  4. Shutdown the server
  5. Start the server
  6. Click the "Console" icon from the dashboard to open an interactive terminal session
  7. Login is root
  8. Configure the interface using the command setup-interfaces
  9. Pick to setup default eth0
  10. Custom config: no
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@nathanmarz
nathanmarz / results-clojure-1.7.0.clj
Last active April 4, 2024 23:46
Specter 0.13.0 benchmark
Benchmark code at: https://github.com/nathanmarz/specter/blob/master/scripts/benchmarks.clj
Run against Clojure 1.7.0 and Java 1.7.0 on Mac OSX 10.11.6
Benchmark: get value in nested map (2500000 iterations)
Avg(ms) vs best Code
53.528 1.00 (-> data (get :a) (get :b) (get :c))
54.708 1.02 (-> data :a :b :c)