Skip to content

Instantly share code, notes, and snippets.

Antonio Aloisio gnuton

Block or report user

Report or block gnuton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gnuton
gnuton / gist:6fa12d87a9ee98fdcb74016f1b09fdd0
Created Dec 5, 2018
Reading HLA dat files in python.. not complete
View gist:6fa12d87a9ee98fdcb74016f1b09fdd0
#!/usr/bin/python
filename="hla.dat"
alleles= []
OP_BEGIN="ID"
OP_WIDTH=2
LAST=-1
View gist:f3e0c7dd5ce45d5757b14b56e20bd91b
Wacom CTH-490
==== List of devices ===
gnuton@Jeremia:~$ xsetwacom --list devices
Wacom Intuos PT S 2 Pen stylus id: 10 type: STYLUS
Wacom Intuos PT S 2 Finger touch id: 11 type: TOUCH
Wacom Intuos PT S 2 Pad pad id: 12 type: PAD
==== Bind buttons to Express keys ====
Express Keys are the 4 keys on the tablet.
@gnuton
gnuton / Mixamo.js
Created Nov 25, 2017
Script which downloads all mixamo animations for one character.
View Mixamo.js
// Mixamo Animation downloadeer
// The following script make use of mixamo2 API to download all anims for a single character that you choose.
// The animations are saved with descriptive long names instead of the short ones used by default by mixamo UI.
//
// This script has been written by gnuton@gnuton.org and the author is not responsible of its usage
//
// How to use this script
// 1. Browse mixamo.com
// 2. Log in
// 3. Open JS console (F12 on chrome)
View cool_names.txt
Aardwolf
Abdol, Ahmet
Abner Little
Abominable Snowman
Abomination
Abominatrix
Abraxas
Absalom
Absorbing Man
Abyss
@gnuton
gnuton / slowprint.py
Created Feb 14, 2016
Python slow print
View slowprint.py
import sys
import time
def slowprint(s):
for c in s + '\n':
sys.stdout.write(c)
sys.stdout.flush()
time.sleep(1./10)
if __name__ == "__main__":
@gnuton
gnuton / README.md
Created Feb 1, 2016 — forked from teffalump/README.md
OpenWRT adblock implementation
View README.md

Others have recently developed packages for this same functionality, and done it better than anything I could do. Use the packages instead of this script:

Description

In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.

View logWatch.sh
#!/bin/ash
# This script filters the logs and send it via mail
# Installation on openwrt
#- opkg update && opkg install diffutils
#- install and setup ssmtp (https://fleshandmachines.wordpress.com/2014/09/14/openwrt-automatic-email-sending/)
#- add it to crontab
# Rules
RULES="grep -v info"
@gnuton
gnuton / cve_2016_0728.c
Created Jan 20, 2016 — forked from jpouellet/cve_2016_0728.c
cve_2016_0728 exploit
View cve_2016_0728.c
/* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <keyutils.h>
#include <unistd.h>
#include <time.h>
@gnuton
gnuton / gist:034e9353b51ab5af7ab8
Created Jan 13, 2016
Script to connect e3372s-153 stick firmware to internet on Linux
View gist:034e9353b51ab5af7ab8
## Reference https://lists.openwrt.org/pipermail/openwrt-devel/2015-July/034094.html
import serial
from subprocess import call
from time import sleep
p='/dev/ttyUSB1'
def toIP(octet):
n=2
ipArray = [int(octet[i:i+n],16) for i in range(0, len(octet), n)][::-1]
@gnuton
gnuton / gist:3ba6dca3ce27d13833da
Created Dec 3, 2015
Python script which switch Huawey hilink e3372 to debug mode, then sends some command to its serial console.
View gist:3ba6dca3ce27d13833da
import urllib2
# retrieve token
url="http://192.168.8.1/api/webserver/token"
response = urllib2.urlopen(url)
xml=response.read()
token=xml[59:-23]
print "Got token %s" % token
You can’t perform that action at this time.