Skip to content

Instantly share code, notes, and snippets.

View ThePooN's full-sized avatar

Hugo Denizart ThePooN

View GitHub Profile
@ThePooN
ThePooN / asn.ts
Last active January 4, 2023 01:35
IPv4 subnets vs. ASN grouping
import { readFile } from "fs/promises";
import { Reader } from '@maxmind/geoip2-node';
const anonymize = true;
const ipaddresses = (await readFile("ipaddresses.csv", "utf8")).split("\n");
const countsPerASN: Map<number, number> = new Map();
const reader = await Reader.open("./GeoLite2-ASN.mmdb");
@ThePooN
ThePooN / Amazon-osu-tourney.md
Last active January 4, 2018 17:57
osu!tourney Amazon VM

Installation

Install drivers, CUDA, XFCE and x11vnc

sudo adduser ubuntu tty
mkdir -p ~/Downloads && cd ~/Downloads
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb && rm cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install cuda xserver-xorg-legacy xfce4 x11vnc
mkdir ~/.x11vnc && x11vnc -storepasswd "password" ~/.x11vnc/passwd
@ThePooN
ThePooN / Enum.class.php
Created July 8, 2016 23:15 — forked from celianvdb/Enum.class.php
Simple Enum class
<?php
class Enum
{
private $enumsList = array();
private $reverseList = array();
public function __construct(array $enums)
{
@ThePooN
ThePooN / razer-bwu13-macro.py
Last active August 29, 2015 14:25 — forked from MatejLach/razer-bwu13-macro.py
Razer BlackWidow keyboard - enable macro keys on Linux - updated for the 2013 Ultimate version.
#!/usr/bin/env python2
# blackwidow_enable.py
#
# Enables the M1-5 and FN keys to send scancodes on the Razer BlackWidow
# and BlackWidow Ultimate keyboards.
#
# You can use 'xev' and 'xbindkeys' to assign actions to the macro keys.
#
# Requires the PyUSB library.