Skip to content

Instantly share code, notes, and snippets.

virtualstaticvoid /
Created Jun 14, 2011
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
saetia / gist:1623487
Last active Sep 28, 2020
Clean Install – OS X 10.11 El Capitan
View gist:1623487

OS X Preferences

most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
nhoffman /
Last active Sep 23, 2020
Python script template
#!/usr/bin/env python3
"""A simple python script template.
import os
import sys
import argparse
brandonb927 /
Last active Sep 20, 2020
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
willurd /
Last active Sep 29, 2020
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
View BBC-Radio.m3u
#EXTINF:-1,BBC - Radio 1
#EXTINF:-1,BBC - Radio 2
#EXTINF:-1,BBC - Radio 3
#EXTINF:-1,BBC - Radio 4
#EXTINF:-1,BBC - Radio 5 live
olasd /
Created Mar 28, 2014
Stream video to youtube via ffmpeg
#! /bin/bash
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://" # URL de base RTMP youtube
tobyspark / tbz.osx.config
Last active Jun 19, 2019
Script to configure a Max OS X machine to my taste
View tbz.osx.config
### Confiure a Mac OS X machine for my taste
### Toby Harris - /
### App Store
# Calca
# Coderunner
# Dash
# Xcode
juancarlospaco /
Last active May 17, 2019
Add Colors to Logging Python3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import logging as log
from copy import copy
if not sys.platform.startswith("win") and sys.stderr.isatty():
josephspurrier / values_pointers.go
Last active Sep 27, 2020
Golang - Asterisk and Ampersand Cheatsheet
View values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
Also available at:
p := Person{"Steve", 28} stores the value
You can’t perform that action at this time.