Skip to content

Instantly share code, notes, and snippets.

@reox
reox / ip6tables.sh
Created July 14, 2014 20:36
ipv6 firewall script
if [ "$1" = "--reset" ]; then
ip6tables -F INPUT
ip6tables -F FORWARD
ip6tables -F OUTPUT
ip6tables -P INPUT ACCEPT
ip6tables -P OUTPUT ACCEPT
ip6tables -P FORWARD ACCEPT
else
# Disable processing of any RH0 packet
@reox
reox / smallcubes_test.py
Created June 18, 2014 19:27
Print out the smallest numbers that are the sum of two cubes
import itertools
x = range(1, 20)
solutions = {}
for a, b in itertools.combinations(x, 2):
sol = a ** 2 + b ** 2
if sol in solutions:
print("Found a solutions: %d^2 + %d^2 = %d^2 + %d^2 = %d " % (a, b, solutions[sol][0], solutions[sol][1], sol))

Keybase proof

I hereby claim:

  • I am reox on github.
  • I am reox (https://keybase.io/reox) on keybase.
  • I have a public key whose fingerprint is 0A30 1C5A 5C2A 80EC 1C55 F02B 0860 1DFA 423D CC9B

To claim this, I am signing this object: