Skip to content

Instantly share code, notes, and snippets.

View tapionx's full-sized avatar

Riccardo Serafini tapionx

View GitHub Profile
@tapionx
tapionx / purge_docker.sh
Created July 17, 2018 09:54
clean all Docker things
docker stop $(docker ps -a -q); docker rm $(docker ps -a -q); docker volume rm $(docker volume ls -q)
@tapionx
tapionx / scrape_email_eurodeputies.py
Last active July 5, 2018 08:57
scrape email addresses for all the italian euro-deputies (https://changecopyright.org/it)
# requirements: pip install requests-html
import json
from requests_html import HTMLSession
import requests
desired_country_code = 'IT'
session = HTMLSession()

Keybase proof

I hereby claim:

  • I am tapionx on github.
  • I am tapion (https://keybase.io/tapion) on keybase.
  • I have a public key ASAZh5EpqWHE10BQAwYTidvFsLIiInhVvD1Rv7ukP6SP4wo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am tapionx on github.
  • I am tapion (https://keybase.io/tapion) on keybase.
  • I have a public key ASAZh5EpqWHE10BQAwYTidvFsLIiInhVvD1Rv7ukP6SP4wo

To claim this, I am signing this object:

@tapionx
tapionx / router
Created February 25, 2014 15:03
router
#!/bin/bash
if [ "`id -u`" -eq 0 ]; then
if [ "$2" ]; then
INIF=$1
OUTIF=$2
iptables --table nat -I POSTROUTING 1 --out-interface $OUTIF -j MASQUERADE
iptables -I FORWARD 1 --in-interface $INIF -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
else
int id;
/* Faccio puntare le aree delle altre CPU all'array dichiarato */
for(id=0;id<NUM_CPU;id++){
if (id == 0){
/* Refer to the Rom Reserved Frame */
pnew_old_areas[id][OLD_SYSBP] = (state_t *)SYSBK_OLDAREA;
pnew_old_areas[id][NEW_SYSBP] = (state_t *)SYSBK_NEWAREA;
pnew_old_areas[id][OLD_TRAP] = (state_t *)PGMTRAP_OLDAREA;
pnew_old_areas[id][NEW_TRAP] = (state_t *)PGMTRAP_NEWAREA;
pnew_old_areas[id][OLD_TLB] = (state_t *)TLB_OLDAREA;