Skip to content

Instantly share code, notes, and snippets.

@donpdonp
donpdonp / omdb.js
Last active September 18, 2019 01:47
gluon omdb/imdb
(function() {
// setup
setup()
// descriptor
return {name:"omdb"}
})
var api_key
function setup() {
donp@jewel zig $ pijul checkout leftover
Current branch: "leftover"
donp@jewel zig $ echo '//extra line' >> build.zig
donp@jewel zig $ pijul status
On branch leftover
Changes not yet recorded:
(use "pijul record ..." to record a new patch)
modified: build.zig
donp@jewel zig $ pjr
What is the name of this patch? leftover change test
Recorded patch 7tFVSqB5XCfBmxrYZHEnN8BfADS4N9FDh9dGoGXhZJ34MnLHHsVzf476R7XrL3U4QidArp6dXPXu2NDvgdC3hTKi
donp@jewel zig $ pijul checkout master
Current branch: "master"
donp@jewel zig $ pijul pull --from-branch leftover
No new patches to pull.
donp@jewel zig $
donp@jewel 1off $ cat main.zig
pub const Command = struct {
id: u16,
payload: union {
a: u16,
b: u16
}
};
pub fn main() void {
@donpdonp
donpdonp / uuid.js
Last active May 1, 2019 15:35
gluon uuid
(function() {
// descriptor
return {name: "uuid"}
})
function go(msg) {
if (msg.method == "irc.privmsg") {
var cmd_match = /^!?uuid/.exec(msg.params.message)
if(cmd_match) {
bot.say(msg.params.channel, uuid())
@donpdonp
donpdonp / pwgen.js
Last active May 1, 2019 15:28
gluon password generator
(function() {
// descriptor
return {name: "pwgen"}
})
var charset="abcdefghijklmnopqrstuvwxyz"+
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+
"1234567890!@#$%^&*()_+-=[]{};':\",./<>?`~";
function go(msg) {
@donpdonp
donpdonp / urbandictionary.js
Last active September 30, 2022 10:21
gluon urban dictionary
(function() {
// descriptor
return {name:"urbandictionary"}
})
function go(msg) {
if (msg.method == "irc.privmsg") {
var cmd_match = /^!urbandictionary(\s+(\w+))?/.exec(msg.params.message)
if(cmd_match) {
var url = 'http://api.urbandictionary.com/v0/define?term='+encodeURIComponent(cmd_match[2])
#https://feedback.weather.com/customer/en/portal/articles/2924682-pws-upload-protocol?b_id=17298
ID=stationid
PASS=pass
URL=http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php
# convert command line C to F (requires bc util)
TEMPF=$(echo "scale=2;((9/5) * $1) + 32" |bc)
# dateutc format is YYYY-MM-DD HH:MM:SS (mysql format)
DATEUTC=now
@donpdonp
donpdonp / iss.js
Last active April 17, 2020 16:47
gluon iss watch
(function() {
alerting_cache()
return {name:"iss"}
})
var cache_date, sightings
function alerting_cache() {
cache_date = new Date(new Date() - 1000*60*60*48) // 48 hours old to trigger load
}
Additive Care offers a push button 3D printing solution for the healthcare industry
AllGo provides insights on the comfort and accessibility of public places for plus-size people
Black Founders Matter Fund is an early stage venture capital fund focused on supporting black entrepreneurs
CMDSense uses a variety of connected devices and other tools to gather data from physical environments to identify efficiencies and improve usability for everyone
De Las Mias empowers Latinas to live healthier lives
Design Week Portland (NEW) One of the most popular and well attended Design Weeks in the world is working to add an additional 51 weeks to its schedule, every year
Dorsum is developing the AdaptiveSpine™, a spinal exoskeleton and supportive device that transfers weight and stress to the hips.
Foundry Collaborative (Mentors in Residence) features the team who built the Adidas connected ball reimagined as a product consultancy
KnowNow Health is on a mission to provide screening and treatment of important medical condi