Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 4, 2024 17:58
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ndarville
ndarville / secret-key-gen.py
Created August 24, 2012 17:01
Generating a properly secure SECRET_KEY in Django
"""
Two things are wrong with Django's default `SECRET_KEY` system:
1. It is not random but pseudo-random
2. It saves and displays the SECRET_KEY in `settings.py`
This snippet
1. uses `SystemRandom()` instead to generate a random key
2. saves a local `secret.txt`
@RaVbaker
RaVbaker / nametab.sh
Created November 27, 2013 12:57
[iTerm] Naming tabs in iTerm
#!/bin/bash
# A simple script which will name a tab in iTerm
# usage:
# $ nametab NewTabName
echo "trying to rename the current tab to $@"
echo -ne "\033]0;"$@"\007"
echo "finished"