Skip to content

Instantly share code, notes, and snippets.

@donghaoren
donghaoren / .block
Last active December 1, 2016 07:39
Stardust Example: Scatterplot
license: mit
description: "Stardust Example: Scatterplot"
@donghaoren
donghaoren / .block
Last active December 1, 2016 07:39
Stardust Example: Index Chart
license: MIT
description: "Stardust Example: Index Chart"
@donghaoren
donghaoren / .block
Last active December 1, 2016 07:39
Stardust Example: SandDance
license: bsd-3-clause
description: "Stardust Example: SandDance"
@donghaoren
donghaoren / .block
Last active December 1, 2016 07:39
Stardust Example: Isotype
license: mit
description: "Stardust Example: Isotypes"
@donghaoren
donghaoren / .block
Last active December 1, 2016 07:39
Stardust Example: Squares
license: bsd-3-clause
description: "Stardust Example: Squares"
@donghaoren
donghaoren / .block
Last active December 1, 2016 07:39
Stardust Example: Force-directed Graph
license: MIT
description: "Stardust Example: Force-directed Graph"
@donghaoren
donghaoren / .block
Last active December 1, 2016 07:39
Stardust Examples: Glyphs
license: MIT
description: "Stardust Example: Glyph-based Visualization"
@donghaoren
donghaoren / .block
Last active December 1, 2016 07:38
Stardust Example: Daily Activities
license: MIT
description: "Stardust Example: Daily Activities of Creative People"
@donghaoren
donghaoren / udp_forwarder.py
Last active April 23, 2018 15:31
UDP Forwarder
#!/usr/bin/python
# This is a simple UDP forwarder with obfuscation support. It listens on a specific port for incoming UDP packets, and then send them to a forward address. In addition, it remembers senders’ addresses, and delivers packets from the forward address to the correct sender. Therefore it maintains ‘connections’ between the server and UDP clients.
# Usage: udp_proxy forward-ip forward-port listen-port [v6] [obfuscate] [local]
# Description:
# Listen on *:listen-port for UDP packets, forward them to forward-ip:forward-port.
# IPv6 support: forward-ip can be an ipv6 address, use option v6 to listen on ipv6 port.
# Use option obfuscate to enable packet obfuscation.
# Use option local to listen on localhost only.
import socket
@donghaoren
donghaoren / udp_forwarder.js
Last active June 19, 2024 13:49
UDP Forwarder
/*!
Copyright (c) Donghao Ren
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: