Skip to content

Instantly share code, notes, and snippets.

View Gregoor's full-sized avatar
🌈
Be kind

Gregor Gregoor

🌈
Be kind
View GitHub Profile
openapi: 3.0.3
info:
title: Coqui Studio API
version: 1.0.0
description: Allows managing and using Coqui Studio resources from your own application
paths:
/api/v2/cloned-voices:
get:
operationId: cloned_voices_retrieve
tags:
const fs = require("fs");
const express = require("express");
const cheerio = require("cheerio");
const jsesc = require("jsesc");
const BASE_HTML = `
<!DOCTYPE html>
<html>
<body>
<div>
@Gregoor
Gregoor / fluent-loader.md
Last active April 15, 2020 10:04
RFC: Fluent loader for Webpack/Rollup

Summary

Create a Fluent loader for webpack (or parcel), allowing developers to write co-located and typed translations.

Motivation

Fluent does not currently offer a solution for developers to ship their translation messages to users. While this is great for inspiring experimentation in this space, it can also lead to developers rolling their own subpar solutions, which might have several of these shortcomings:

  • Lack of code splitting - sending more messages to the client than are
1 239
2 141
3 118
4 85
5 3575
6 46
7 34
8 37
9 37
10 1280
@Gregoor
Gregoor / README.md
Last active March 2, 2017 09:20
Query Builder

Quirrel

Goals

  • Immutable
  • Extensible
  • Cover all of PostgreSQL's functionaliy
  • Transpile SQL to Quirrel
@Gregoor
Gregoor / status.py
Created December 6, 2016 21:04
for API v0.13 with single pass (`STATUS_PASSWORD` as env var)
'''
Implement the SpaceApi (<https://github.com/SpaceApi/SpaceApi>)
for Chaos Darmstadt (<https://www.chaos-darmstadt.de/>).
'''
import os
import json
import time
from flask import Flask, Response, request
from jsonschema import validate
"""
Implement the SpaceApi (<https://github.com/SpaceApi/SpaceApi>)
for Chaos Darmstadt (<https://www.chaos-darmstadt.de/>).
"""
import falcon
import os
import json
import time
@Gregoor
Gregoor / API.js
Last active January 11, 2017 11:18
DreamBase
class User extends Record {
static fields = {
name: 'string',
email: ['string', ['lowercase', 'trim']],
posts: [Post]
};
}
@Gregoor
Gregoor / aoc4.js
Created December 6, 2015 20:56
Advent of Code - Day 4: The Ideal Stocking Stuffer
import MD5 from 'crypto-js/md5';
const findNumberForPrefixedMD5 = (str, prefix = '00000') => {
let i = 0;
let hash;
do {
i += 1;
hash = MD5(str + i).toString();
} while (!hash.startsWith(prefix));
return i;
@Gregoor
Gregoor / aoc3.js
Last active December 6, 2015 20:19
Advent of Code - Day 3: Perfectly Spherical Houses in a Vacuum
const parseSantaRoute = (str, roboMode = false) => {
const charFns = {
'^': (x, y) => [x , y + 1],
'v': (x, y) => [x , y - 1],
'>': (x, y) => [x + 1, y ],
'<': (x, y) => [x - 1, y ]
};
let error;
let position = [0, 0];