Skip to content

Instantly share code, notes, and snippets.

@dseg
dseg / nftables.conf
Created April 22, 2016 07:45
A basic nftables config. Only accept ssh, http and https.
#!/usr/bin/nft -f
# ipv4/ipv6 Simple & Safe Firewall
# you can find examples in /usr/share/nftables/
table inet filter {
chain input {
type filter hook input priority 0;
# allow established/related connections
ct state {established, related} accept
@simeonf
simeonf / pex.md
Last active January 9, 2024 05:11
Creating a PEX from a python script

So you want to create a pex that packages your script and its dependencies?

Ok - first to make our script! Call it foo.py:

import requests

if __name__ == '__main__':
  req = requests.get("https://raw.githubusercontent.com/pantsbuild/pex/master/README.rst")
  print req.text.split("\n")[0]