Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2025 23:53
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@phred
phred / pedantically_commented_playbook.yml
Last active February 26, 2025 14:19
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@SegFaultAX
SegFaultAX / fib.lua
Created May 23, 2012 00:48
Lua Fibonacci
-- Author: Michael-Keith Bernard
-- Date: May 22, 2012
-- Description: Various implementations of the Fibonacci sequence in Lua. Lua
-- has native support for tail-call elimination which is why `tail_call` and
-- `continuation` run in near constant time. For sufficiently large numbers of n
-- you can start to see linear performace characteristics (particularly for the
-- `continuation` implementation), but ultimately the `tail_call` implementation
-- is an order of magnitude faster than iteration even for values of n as small
-- as 500k.
@jbpotonnier
jbpotonnier / .gitignore
Created February 16, 2012 19:53
[Flask] Routing with class
bin
include
lib
local
*.swp
*.pyc
@anandology
anandology / subdomain_wsgi.py
Created November 1, 2010 12:11
WSGI application to delegate requests based on domain name.
import re
class SubDomainApp:
"""WSGI application to delegate requests based on domain name.
"""
def __init__(self, mapping):
self.mapping = mapping
def __call__(self, environ, start_response):
host = environ.get("HTTP_HOST", "")