This file contains 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
netstat -lnt | grep LISTEN | awk '{ print ( $4 ) }' | awk 'BEGIN{FS=":"} { print $(NF) }' | sort -n | uniq |
This file contains 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
-- most of this is not needed fo the download, but this code keeps the app running even when there is an error | |
-- when an error happens, this code offers the option to update the files through the server | |
-- start at line 200 if you only want the file download service | |
function run() | |
if love.math then | |
love.math.setRandomSeed(os.time()) | |
end |
This file contains 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
local m=component.proxy(component.list("modem")()) | |
m.open(2412) | |
local function respond(...) | |
local args=table.pack(...) | |
pcall(function() m.broadcast(2412, table.unpack(args)) end) | |
end | |
local function receive() | |
while true do | |
local evt,_,_,_,_,cmd=computer.pullSignal() | |
if evt=="modem_message" then return load(cmd) end |
This file contains 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
local ffi = require("ffi") | |
-- Create a C struct representing the header for our packet | |
ffi.cdef([[ | |
typedef struct { | |
uint32_t uuid; // user identifier | |
uint32_t size; // in bytes | |
uint32_t bitrate; // in Hz | |
uint16_t bitdepth; // bits per sample | |
uint16_t channels; // probably 1 or 2 |
This file contains 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
local header = [[ | |
typedef struct FILE FILE; | |
typedef struct libvlc_instance_t libvlc_instance_t; | |
typedef int64_t libvlc_time_t; | |
typedef struct libvlc_log_iterator_t libvlc_log_iterator_t; | |
typedef struct libvlc_log_message_t | |
{ | |
int i_severity; | |
const char *psz_type; | |
const char *psz_name; |