Skip to content

Instantly share code, notes, and snippets.

@donpdonp
donpdonp / ecoli.js
Last active May 23, 2023 03:21
gluon ecoli report
View ecoli.js
(function(){
return {name: "ecoli"}
})
var dbkey = "ecoli"
var url = 'https://www.portlandoregon.gov/bes/waterquality/results.cfm?location_id=7132'
var state
function setup() {
db.get(dbkey, function(json) {
@donpdonp
donpdonp / coin.js
Last active May 18, 2023 15:54
gluon coinmarketcap coin price
View coin.js
(function() {
setup()
return {
name: "coin"
}
})
var etherscan_apikey
var cache_date = new Date(0)
var cache = {data:[]}
@donpdonp
donpdonp / price.js
Last active May 17, 2023 14:41
gluon simple price watch
View price.js
(function() {
setup()
return {
name: "price"
}
})
var dbkey = "price"
var alert_channel = "#zrobo"
var state = { watches: {} }
@donpdonp
donpdonp / weather.js
Last active May 12, 2023 17:59
gluon weather rain
View weather.js
(function() {
// descriptor
setup()
return {name:"weather"}
})
var apikey_climacell
var apikey_pirateweather
function setup(){
@donpdonp
donpdonp / chatgpt.js
Last active March 31, 2023 17:13
neuron chatGPT
View chatgpt.js
(function() {
setup()
return {name:"chatgpt"}
})
var dbkey = "openai-key"
var api_key = ""
function setup() {
db.get(dbkey, function(key) {
@donpdonp
donpdonp / example.com.conf
Last active December 14, 2022 20:49
nginx.conf https only with letsencrypt using lego client
View example.com.conf
# /etc/nginx/sites-enabled/example.com.conf
server {
listen 80;
server_name .example.com;
root /var/letsencrypt/webcache;
location /.well-known {
try_files $uri =404;
}
location / {
return 301 https://$host$request_uri;
@donpdonp
donpdonp / tls.js
Last active October 22, 2022 19:51
gluon tls ssl checks
View tls.js
(function() {
setup()
return {name:"tls"}
})
var alert_channel = "#pdxbots"
var watchlist = {}
var key = "tls:watchlist"
function setup() {
@donpdonp
donpdonp / kernel.js
Last active October 7, 2022 15:28
gluon kernel
View kernel.js
(function() {
kernel_cache()
return {name:"kernel"}
})
var db_key = "kernel:cache"
var kver = {}
var alert_channel = "#pdxtech"
function kernel_cache() {
@donpdonp
donpdonp / urbandictionary.js
Last active September 30, 2022 10:21
gluon urban dictionary
View urbandictionary.js
(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])
@donpdonp
donpdonp / github.js
Last active September 6, 2022 22:24
gluon github status watch
View github.js
(function() {
// setup
setup()
// descriptor
return {name: "github"}
})
// global state
var report_channel = '#' //disable
var major_report_channel = '#pdxtech'