Skip to content

Instantly share code, notes, and snippets.

@frk1
frk1 / cf.py
Last active April 8, 2018 18:21
Use the cloudflare firewall to block ddos attacks
#!/usr/bin/env python3
# pip3 install --upgrade requests pycountry dnspython
import ipaddress
import requests
import pycountry
import dns.resolver
ALLOWED_COUNTRIES = ['DE', 'AT']
CF_CREDENTIALS = {'X-Auth-Email': 'YOUR_MAIL',
@frk1
frk1 / ipv4.txt
Last active April 20, 2024 08:01
Get Netflix IP ranges
# 2017-10-01T14:14:44+00:00
108.175.32.0/20
108.175.34.0/24
108.175.35.0/24
192.173.64.0/18
198.38.100.0/24
198.38.101.0/24
198.38.108.0/24
198.38.109.0/24
#!/bin/bash
set -e
apt-get update -y qq
apt-get install -y -qq curl git
curl -L https://git.io/n-install | N_PREFIX=~/.n bash -s -- -y
source $HOME/.bashrc
npm install --silent -g npm@latest coffee-script pm2
git clone https://github.com/frk1/steamhourboostv2.git $HOME/steamhourboostv2
cd $HOME/steamhourboostv2
@frk1
frk1 / 3dhull.cpp
Last active August 29, 2015 14:25 — forked from msg555/3dhull.cpp
3D Convex Hull
#include <iostream>
#include <vector>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cassert>
using namespace std;