Skip to content

Instantly share code, notes, and snippets.

@drj42
drj42 / org-mode-reference-in.org
Created February 6, 2012 23:53
This is a cheat sheet for Emacs org-mode... in org-mode format!
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 20, 2024 15:48
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@tmeissner
tmeissner / yate.py
Created December 16, 2012 23:34
Yet another template engine: a collection of simple functions to generate HTML content (taken from 'Head first Python' and expanded)
def start_response(resp="text/html"):
return('Content-type: ' + resp + '\n\n')
def html_header(title="default"):
return("""
<head>
<meta charset="utf-8" />
<title>""" + title + """</title>
</head>"""
)
@thecapacity
thecapacity / kinect_demo_tilt_scroll.py
Created February 19, 2013 00:14
Simple demo for using Kinect with freenect's python wrapper
#!/usr/bin/env python
import freenect
import time
import sys
TILT_MAX = 30
TILT_STEP = 10
TILT_START = 0
if sys.argv[1]: TILT_MAX = int(sys.argv[1])
@dideler
dideler / 0-startup-overview.md
Last active July 17, 2024 08:10
Startup Engineering notes
@plentz
plentz / nginx.conf
Last active July 17, 2024 09:16
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@gcardone
gcardone / ConfidenceInterval.py
Created August 10, 2014 17:58
How to calculate confidence interval for means with unknown standard deviation using the Student t distribution. Needs numpy and scipy
#!/usr/bin/env python
from scipy.stats import t
from numpy import average, std
from math import sqrt
if __name__ == '__main__':
# data we want to evaluate: average height of 30 one year old male and
# female toddlers. Interestingly, at this age height is not bimodal yet
data = [63.5, 81.3, 88.9, 63.5, 76.2, 67.3, 66.0, 64.8, 74.9, 81.3, 76.2,
@dublx
dublx / retry.sh
Last active July 8, 2024 12:34
Bash - retry command N times
#!/bin/bash
set -euo pipefail
function myFunction() {
myCommand
return $?
}
retry=0
maxRetries=5
@Jaza
Jaza / Private-pypi-howto
Last active July 2, 2023 16:24
Guide for how to create a (minimal) private PyPI repo, just using Apache with directory autoindex, and pip with an extra index URL.
*
@vasanthk
vasanthk / System Design.md
Last active July 20, 2024 11:09
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?