This is definitely cool, but not free (webscript.io hooks expire after seven days for free account).

seen from Poland
seen from Yemen

seen from Singapore

seen from United States

seen from Türkiye
seen from Russia
seen from Russia
seen from Malaysia

seen from Brazil

seen from Germany
seen from United Kingdom
seen from Türkiye
seen from India

seen from Malaysia
seen from United States
seen from United States
seen from Australia
seen from China
seen from T1
seen from Türkiye
This is definitely cool, but not free (webscript.io hooks expire after seven days for free account).
Lightweight Lua JSON Validator
I'll admit it: I've been completely sucked into webscript.io. Webscript.io is a site that allows for small Lua scripts to be hosted on user-selected URLs. A coworker and I have spent the last two weeks designing new dashboards for our Rackspace team, scraping websites, and throwing small scripts back and forth. The number of written lines of Lua between the two of us has easily broken into the thousands.
While working on a recent script, I ran into a situation where JSON would need to be input and parsed. Unfortunately, the built-in webscript.io JSON.parse function does not have any sort of decent error handling. If there is a problem, your script 500s and the user receives a blank response.
There are a lot of incredibly in-depth Lua JSON libraries, but keeping with webscript.io's spirit of "small scripts", I was hesitant to import any of them in their entirety. All I needed from these libraries was validation - is this string valid JSON, or are there missing brackets and broken syntax?
This led to the creation of a Lua JSON Validator. The module does exactly as described above: takes a string as input and returns true or false if it's valid JSON.
To use the module, you simply need to import it via a require statement:
local validJson = require "amussey/lua-json-validator/validJson" if validJson(jsonString) then -- interact with valid JSON else -- report invalid JSON end
A series of test cases are also provided with the module.
To view the source code, visit the github repo:
https://github.com/amussey/lua-json-validator/
As always, pull requests on the repo or comments on this post are welcome!
Automated Email Reminder
I have been volunteering at the food pantry in Austin for nearly six years and I always volunteer on the first Thursday of the month. Despite this, I frequently forget that it is the first Thursday of each month and sit at home thinking about why I feel I am missing something.
I setup Google calendar reminders but the problem is that my primary todo box is my email. I use Boomerang all of the time to remind myself of tasks and to send emails but there is no way to schedule an email to automatically send on a schedule.
I have been following the team at webscript.io and decided that I would see how easy it is to use the online scripting tool to write my email reminder server. Turns out, extremely easy, the hardest thing was learning Lua syntax.
Copying an example on the webscript site, I setup the email settings:
local username = '[email protected]' local password = '******************' local server = 'smtp.gmail.com'
Then I needed to setup the logic part which checks to see if the date is a Thursday and then if the number in the date is less than 8. if (os.date("%A") == "Thursday") and (tonumber(os.date("%d")) < 8) then email.send { server=server, username=username, password=password, from='[email protected]', -- replace with your 'from' address to='[email protected]', -- replace with your 'to' address subject='Volunteer today!!', text="Be there." } end
The final piece was setting up a cronjob to run my script every 24 hours.
All in all using webscript.io was fun and I look forward to using it on a job soon. I also look forward to missing fewer events...