This file contains hidden or 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
// ==UserScript== | |
// @name OK COVID-19 Vaccine Finder | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Hides Oklahoma COVID-19 Vaccine search results for clinic locations without any bookings | |
// @author Jonathan Yarbor | |
// @match https://vaccinate.oklahoma.gov/en-US/covidvaccine-location-map/ | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
'use strict'; | |
const nats = require('nats'); | |
const config = require('./config/nats.json'); | |
const natsClient = nats.connect(config.connection); | |
const killServer = () => { | |
setTimeout(() => { | |
natsClient.options.timeout = 1; | |
console.log('😈 Killing connection and breaking timeout', natsClient.options.timeout); |
This file contains hidden or 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
var nodegit = require('nodegit'); | |
var opts = { | |
fetchOpts: { | |
callbacks: { | |
credentials: function() { | |
return nodegit.Cred.sshKeyNew('git', './ssh/id_rsa.pub', './ssh/id_rsa', ''); | |
}, | |
certificateCheck: function() { | |
return 1; |
This file contains hidden or 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
new Date(dates[i].slice(0, 4), dates[i].slice(5, 7), dates[i].slice(8, 10), dates[i].slice(11, 13), dates[i].slice(14, 16), dates[i].slice(17, 19)); |
This file contains hidden or 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
var pattern = new RegExp('([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2})\.([0-9]{1,2})'); | |
var parts = dates[i].match(pattern); | |
new Date(parts[1], parts[2], parts[3], parts[4], parts[5], parts[6]); |
This file contains hidden or 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
var timestamp = '2000/01/01 00:00:00', | |
dates = [], | |
total = 1000, | |
i = 0, | |
pattern = new RegExp('([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2})\.([0-9]{1,2})'); | |
var makeNiceDate = function(date, len){ // make sure our date formats are "01-01-2000" rather than "1-1-2000" | |
len = len || 2; | |
return String("0"+date).slice(-len); | |
} |
This file contains hidden or 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
new Date(dateString); |
This file contains hidden or 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
var ejs = require('ejs'), | |
_ = require('lodash'); | |
var util = require('util'); | |
app.engine('ejs', ejs.renderFile); | |
app.set('view engine', 'ejs'); | |
app.set('views', '/path/to/templates'); | |
app.use(function(req, res, next){ |
This file contains hidden or 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
'use strict'; | |
var io = require('socket.io'), | |
express = require('express'), | |
http = require('http'), | |
https = require('https'), | |
fs = require('fs'), | |
splitca = require('split-ca'); | |
module.exports = function(){ |
NewerOlder