Skip to content

Instantly share code, notes, and snippets.

@legumbre
Created June 25, 2012 23:29
Show Gist options
  • Select an option

  • Save legumbre/2992084 to your computer and use it in GitHub Desktop.

Select an option

Save legumbre/2992084 to your computer and use it in GitHub Desktop.
-- in src/common
-- python -m SimpleHTTPServer 10000 .
function dale()
require("socket.http")
host='localhost'
port='10000'
file='localuser.lua'
url='http://' .. host .. ':' .. port .. '/' .. file
str, h = socket.http.request(url)
chunk, err = loadstring(str)
if chunk then pcall(chunk) end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment