This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compatible with Python3, tested on Linux | |
# Author Arnaud Loonstra <[email protected]> | |
# based on <http://code.activestate.com/recipes/439093/#c1> | |
import socket | |
import fcntl | |
import struct | |
import array | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on http://carnivore.it/2012/10/12/python3.3_sendmsg_and_recvmsg | |
# Example of using the new recvmsg() method of the sockets module | |
import ipaddress | |
import socket | |
import ctypes | |
# First, we have to tell the socket we want to receive this additional data. | |
# As the socket module lacks some constants, we need to define them too. | |
IP_PKTINFO = 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A ZeroMQ Event loop class for Urwid. This class inherits from the original | |
# SelectEventLoop and replaces the filedescriptor polling with the ZeroMQ | |
# methods. | |
# Author: Arnaud Loonstra <[email protected]> | |
import zmq | |
import time | |
class ZmqEventLoop(urwid.SelectEventLoop): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Simple Dynamic DNS update script for use with DNSMasq | |
# | |
# Install this WSGI script on a (apache) webserver. Make sure | |
# DNSMasq runs as the same user as this script does on the webserver | |
# E.g: /etc/default/dnsmasq add: (Debian and deriatives) | |
# DNSMASQ_USER='wsgiuser' | |
# | |
# ### DNSMASQ.CONF ### | |
# domain-needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyre import zbeacon | |
import zmq | |
import struct | |
import uuid | |
import socket | |
ctx = zmq.Context() | |
beacon = zbeacon.ZBeacon(ctx, 1200) | |
transmit = struct.pack('cccb16sH', b'Z',b'R',b'E', | |
1, uuid.uuid4().bytes, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# win_socket_test.py | |
# | |
# Test using netcat: | |
# nc -un 127.0.0.1 1200 | |
# Broadcast test: | |
# socat - UDP-DATAGRAM:255.255.255.255:1200,broadcast | |
import socket | |
import struct | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* GStreamer GLES2 Raspberry Pi example | |
* Based on http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/gl/generic/cube/main.cpp | |
* Modified for Raspberry Pi/GLES2 by Arnaud Loonstra <[email protected]> | |
* Orginal by Julien Isorce <[email protected]> | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Library General Public | |
* License as published by the Free Software Foundation; either | |
* version 2 of the License, or (at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# For the sake of humanity here's a python script retrieving | |
# ip information of the network interfaces. | |
# | |
# Pay some tribute to my soul cause I lost a few years on this one | |
# | |
# based on code from jaraco and many other attempts | |
# on internet. | |
# Fixed by <@gpotter2> from scapy's implementation to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash --debugger | |
set -e | |
BRANCH="master" | |
if grep -q BCM2708 /proc/cpuinfo; then | |
echo "RPI BUILD!" | |
RPI="1" | |
fi | |
[ -n "$1" ] && BRANCH=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Start this script through the Advanced Launcher Addon | |
# | |
# This script fixes not getting a display after stopping Kodi | |
# After quitting UAE it will return to Kodi | |
# | |
# Expecting UAE4All in /home/pi/amiga/uae4all | |
# | |
# Author: Arnaud Loonstra <[email protected]> |
OlderNewer