Skip to content

Instantly share code, notes, and snippets.

@houqp
houqp / file_lock.py
Created October 26, 2018 21:11
python linux file lock
def unsafe_function():
print('ONLY RUN ME ONCE!')
first = True
lock = open('foo', 'w+')
while True:
try:
fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
if first:
unsafe_function()

Privacy Guide for Activists with Haters

In light of the gamergate fiasco, we realized that most of the targeted individuals had their private information trivially publicly online. This guide is meant to help people take basic steps required to protect their online privacy, hopefully reducing the number of crazies who threaten to show up at your house.

We do not believe that leaving your information online means you deserve harassment, we simply wish to arm people who want to speak up with all the defensive tools available.

This guide is not an anti-government-surveillance document, as it only helps you make your information private and does not remove it.

Hiding Your Whois Data

This one should be easy, but it is the number one privacy failure we found when checking information of individuals who have previously been harassed.