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
let ogprefix = 'og: http://ogp.me/ns#' | |
let title = 'Wire Up Your Front-End' | |
let description = 'Get your personal guide to finally piece together the missing puzzles to communicate with your server' | |
let color = '#f42525' | |
let author = 'Martin Muzatko' | |
module.exports = { | |
title, | |
description, | |
serviceWorker: true, |
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
2 Chainz and Wiz Khalifa - We Own It | |
4 Non Blondes - What's Up .mp4 | |
5 Seconds Of Summer - Amnesia | |
5 Seconds Of Summer - Beside You | |
5 Seconds Of Summer - Don't Stop | |
5 Seconds Of Summer - Good Girls | |
5 Seconds Of Summer - Heartbreak Girl | |
5 Seconds Of Summer - Hey Everybody! | |
5 Seconds Of Summer - Jet Black Heart | |
5 Seconds Of Summer - She Looks So Perfect |
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
function commarize() | |
{ | |
// 1e6 = 1 Million, begin with number to word after 1e6. | |
if (this >= 1e6) | |
{ | |
var units = | |
[ | |
"Million", | |
"Billion", | |
"Trillion", |
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
import './style.css' | |
import { createDrawFunction, objectTypes } from 'declarative-canvas' | |
interface Point { | |
x: number | |
y: number | |
} | |
interface Player extends Point { | |
width: number |
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 sqlFormatter = require('sql-formatter') | |
const promisify = require('promisify-node') | |
const fs = promisify('fs') | |
const path = require('path') | |
const INDENT = '\t' | |
const SCHEMAFILE = path.resolve(__dirname, 'schema.sql') | |
(async () => { | |
try { |
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 meow = require('meow') | |
const prop = k => o => o[k] | |
const pipe = (...fns) => x => [...fns].reduce((acc, f) => f(acc), x) | |
const siconstore = () => ({ | |
cli: meow(` | |
Usage | |
$ siconstore [command] | |
Available Commands |
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
import { BlitzApiHandler, BlitzApiRequest, BlitzApiResponse, getSession } from 'blitz' | |
import multer from 'multer' | |
import * as path from 'path' | |
import * as fs from 'fs/promises' | |
import db from 'db' | |
import cors from 'cors' | |
import { nanoid } from 'nanoid' | |
const runMiddleware = (req: BlitzApiRequest, res: BlitzApiResponse, fn: (req, res, fn) => any) => | |
new Promise((resolve, reject) => { |
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
{"openapi":"3.0.1","info":{"title":"SICON Gateway REST API","version":"1.0.0","description":"This API provides access to the gateway database and its adapters, devices and spawned errors."},"host":"a","servers":[{"url":"/api/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"bearerAuth":[]}],"swagger":"2.0","paths":{"/app-catalog":{"get":{"security":[{"bearerAuth":[]}],"tags":["appCatalog"],"description":"Serves a list of apps from the catalog","produces":["application/json"],"responses":{"200":{"description":"OK"},"401":{"description":"Authorization failed"}}}},"/apps":{"get":{"tags":["app"],"security":[{"bearerAuth":[]}],"description":"Serves a list of installed apps plus the default one","produces":["application/json"],"responses":{"200":{"description":"OK"},"401":{"description":"Authorization failed"}}},"post":{"security":[{"bearerAuth":[]}],"description":"Triggers the installation of a new app","tags":["app"],"produces":["application |
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
import * as fs from 'fs/promises' | |
interface Habit { | |
name: string | |
process: string[] | |
} | |
interface HabitsPageDependencies { | |
load: (amount: number) => Promise<Habit[]> | |
} |
NewerOlder