Skip to content

Instantly share code, notes, and snippets.

>>> for x in [True, False]:
... for y in [True, False]:
... print('{0} or {1} = {2}'.format(x, y, x or y))
...
True or True = True
True or False = True
False or True = True
False or False = False
Create and customize Vagrantfile, for example:
Vagrant.configure("2") do |config|
config.vm.guest = :freebsd
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
config.vm.box = "freebsd/FreeBSD-10.3-RELEASE"
config.ssh.shell = "sh"
config.vm.base_mac = "080027D15C66"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--cpus", "2"]

Keybase proof

I hereby claim:

  • I am chair6 on github.
  • I am chair6 (https://keybase.io/chair6) on keybase.
  • I have a public key ASC-YTR4JhalhIoTl7jV5WBns_yD-IZzZOeAp5LSmgtDNAo

To claim this, I am signing this object:

@finnigja
finnigja / dnsdiff.py
Last active July 26, 2022 02:36
Script for comparing DNS lookup results across multiple resolvers
#!/usr/bin/env python
#
# DNS Result Comparison Utility
# Author: https://twitter.com/chair6
#
import argparse
import dns.resolver
import dns.rdatatype
from collections import defaultdict
@finnigja
finnigja / nat-wlan-to-eth.sh
Created April 25, 2012 17:06
NAT'ing ethernet to wifi
#!/bin/bash
echo "1" > /proc/sys/net/ipv4/ip_forward
ifconfig eth0 192.168.200.1 netmask 255.255.255.0 up
/etc/init.d/isc-dhcp-server start
iptables --flush
iptables -t nat --flush
iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT