This file contains 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
const SQL = require('sql-template-strings'); | |
module.exports = { | |
slice: (start, end) => SQL` | |
SELECT | |
eventid, | |
CAST(latitude AS REAL) AS latitude, | |
CAST(longitude AS REAL) AS longitude, | |
CAST(nkill AS INT) AS nkill, | |
CAST(iyear AS INT) AS year |
This file contains 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
const Koa = require('koa'); | |
const logger = require('koa-logger'); | |
const Router = require('koa-router'); | |
const cors = require('@koa/cors'); | |
const sqlite = require('sqlite'); | |
const qs = require('./db/queries'); | |
const DB_LOC = './db/terror.sqlite' | |
const app = new Koa(); |
This file contains 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
logLevel = "DEBUG" | |
defaultEntryPoints = ["http", "https"] | |
[api] | |
[kubernetes] | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" |
This file contains 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
// | |
// InterfaceController.swift | |
// AppleWatchExample WatchKit Extension | |
// | |
// Created by Robert Herley on 4/28/19. | |
// Copyright © 2019 Robert Herley. All rights reserved. | |
// | |
// Adapted From: https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/speedysloth_creating_a_workout |
This file contains 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
API_URI="http://host.docker.internal:5000/api/v1/plague_doctor" # plague doctor endpoint | |
TEST_DATA="{\"submissionID\":\"1337\",\"assignmentID\":\"5cbfe2f3fe0eecea1cfcaef1\",\"testBuildCMD\":\"echo build stuff here\",\"tests\":[{\"name\":\"Test 1\",\"expectedOutput\":\"foobar\",\"studentFacing\":true,\"testCMD\":\"echo -n foobar\"},{\"name\":\"Test 2\",\"expectedOutput\":\"foo\\nbaz\",\"studentFacing\":true,\"testCMD\":\"echo -n foobar\"},{\"name\":\"Test 3\",\"expectedOutput\":\"foobaz\",\"studentFacing\":true,\"testCMD\":\"echo -n foobar\"},{\"name\":\"Test 4\",\"expectedOutput\":\"f00bar\",\"studentFacing\":true,\"testCMD\":\"echo -n foobar\"},{\"name\":\"Test 5\",\"expectedOutput\":\"oobar\",\"studentFacing\":true,\"testCMD\":\"echo -n foobar\"},{\"name\":\"Test 6\",\"expectedOutput\":\"foobar\",\"studentFacing\":true,\"testCMD\":\"echo -n foobar\"},{\"name\":\"Test 7\",\"expectedOutput\":\"foobar\",\"studentFacing\":true,\"testCMD\":\"echo -n foobar\"},{\"name\":\"Test 8\",\"expectedOutput\":\"foobar\",\" |
This file contains 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
const { promisify } = require('util'); | |
const axios = require('axios'); | |
const consola = require('consola'); | |
const client = require('redis').createClient(); | |
const flushall = promisify(client.flushall).bind(client); | |
axios.interceptors.request.use( | |
config => { | |
config.meta = { startTime: new Date() }; | |
return config; |
This file contains 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
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"math/rand" | |
"net/http" | |
"time" | |
valid "github.com/asaskevich/govalidator" |
This file contains 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
int MOTORPIN = 9; | |
int analog_input = 82; | |
String input; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
Serial.print("Current Analog Value:"); |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>slu.gg</title> | |
<style> | |
:root { | |
--bg: #434c5e; | |
--white: #e5e9f0; |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Compulsory Sterilizations</title> | |
</head> | |
<body> | |
<style> |