Skip to content

Instantly share code, notes, and snippets.

def and(bits1, bits2):
"""
Executes AND operation on 2 binary numbers, like it is done internally when using & operator
"""
bits_out = []
while True:
if i > len(bits1) && i > len(bits2):
# We have past all bits in both numbers, break out of the loop now
break
if i < len(bits1):
@vierbergenlars
vierbergenlars / build.sh
Last active December 12, 2015 03:28
UglifyJS bug report attachment
uglifyjs original.js -c -b --comments all -o commented.js
uglifyjs original.js -c -m -o min.js
@vierbergenlars
vierbergenlars / segv.php
Created November 20, 2012 16:49
Get a PHP segfault

First, clone git clone [email protected]:vierbergenlars/gihp.git Check out git checkout 08dc6abfdbf90b1e1a8b10cd7064601fb820d950 And then insert the file above and run with php segv.php