When something goes wrong I want to degrade the user experience (instead of returning a 500 - Server Error) And I want to be notified about the failure
Wrap non mission critical code:
-- This all starts with some functions and a *materialized* postgres view that unnests several | |
-- arrays of strings of definitions into flattened rows that are easier to search. Fun fact: | |
-- you can even create indexes on materialized views' columns! They'll refresh whenever the view | |
-- is refreshed (which in my case is every time that we pull new dictionary data from WaniKani or JMDICT | |
-- This function will take an array of strings and convert all the double-width alphanumeric characters | |
-- and normalize them as half-width. That way a search query can be massaged from "OK" to "ok" easily | |
CREATE OR REPLACE FUNCTION array_hankakufy_romaji(character varying[]) | |
RETURNS character varying[] | |
AS |
%YAML 1.2 | |
--- | |
name: Ruby (Custom) | |
# TODO: unresolved issues | |
# | |
# text: | |
# "p << end | |
# print me! | |
# end" | |
# symptoms: |
# STEP 1: Enable Virtual Machine Platform feature | |
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
# STEP 2: Enable WSL feature | |
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
# STEP 3: Restart Win 10 Machine | |
# STEP 4: To set the WSL default version to 2. | |
# Any distribution installed after this, would run on WSL 2 |
FROM ruby:2.7.1-slim AS base | |
LABEL maintainer="Yann Defretin <[email protected]" | |
# Common dependencies | |
RUN apt-get update -qq \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \ | |
--no-install-recommends \ | |
build-essential=12.6 \ | |
gnupg2=2.2.12-1+deb10u1 \ |
--- | |
# Archive of http://www.columbia.edu/~alan/schemas/common/jsonapi.yaml | |
openapi: 3.0.2 | |
info: | |
version: 1.0.0 | |
title: "{json:api} Specification" | |
description: > | |
An include file to define the [{json:api} 1.0 specification](http://jsonapi.org/format). | |
N.B. I've got some confusion going on between a validating a jsonapi schema and defining one! |
require "openssl" | |
require "securerandom" | |
########################## | |
### iOS/Android Device ### | |
########################## | |
# Installation id - returned by the registration request | |
uuid = "E1D160C7-F6E8-48BC-8687-63C696D910CB" | |
uuid_bytes = uuid.scan(/[0-9A-Z]{2}/).map { |s| s.to_i(16) }.pack("C*") |
JSONAPIObject: | |
description: Includes the current JSON:API version for this specification as well as optional meta information | |
type: object | |
required: | |
- version | |
properties: | |
version: | |
type: string | |
default: '1.0' | |
example: '1.0' |