Skip to content

Instantly share code, notes, and snippets.

View mathieucaroff's full-sized avatar

Mathieu CAROFF mathieucaroff

View GitHub Profile
@egernst
egernst / iptables-cheatsheet.md
Last active October 14, 2023 16:42 — forked from mcastelino/iptables-cheatsheet.md
iptables-cheatsheet

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal
@jnaulty
jnaulty / .tmux.conf
Last active July 24, 2021 20:21 — forked from nicolasochem/.tmux.conf
The best tmux and vim configuration in the universe
# Our .tmux.conf file
# Setting the prefix from C-b to C-s
set -g prefix C-s
# enable vi keys.
setw -g mode-keys vi
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -sg escape-time 1
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 3, 2024 12:32
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@HaiyangXu
HaiyangXu / Server.py
Created May 18, 2014 14:00
A simper python http server can handle mime type properly
# -*- coding: utf-8 -*-
#test on python 3.4 ,python of lower version has different module organization.
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
@HowardMei
HowardMei / gist:4350896
Last active May 16, 2020 16:30
python bash integration
A collection of python & shell integration attempts:
pysh:Write shell scripts in Python
https://github.com/yunabe/pysh
lshell:function limited shell
https://github.com/ghantoos/lshell
sh:similar to plumbum but has builtin features
https://github.com/amoffat/sh
@endolith
endolith / gcd_and_lcm.py
Last active June 22, 2022 23:33
GCD and LCM functions in Python for several numbers
# Greatest common divisor of 1 or more numbers.
from functools import reduce
def gcd(*numbers):
"""
Return the greatest common divisor of 1 or more integers
Examples
--------