Skip to content

Instantly share code, notes, and snippets.

View tobiaslins's full-sized avatar

Tobias Lins tobiaslins

View GitHub Profile
@alrocar
alrocar / anomaly_detection.pipe
Created June 22, 2021 17:06
Z-score based anomaly detection
NODE context
DESCRIPTION >
Based on https://blog.tinybird.co/2021/06/24/anomaly-detection/
SQL >
%
SELECT
sum(qty) qty,
toStartOfInterval(utc_date, INTERVAL {{Int32(interval_duration, 10)}} second) date
FROM
@dsumer
dsumer / TaxRateModel.ts
Last active February 2, 2022 15:07
Apply the correct VAT Rate to your customer in Stripe Checkout
import { Model } from 'objection';
export default class TaxRateModel extends Model {
countryCode!: string;
stripeId!: string;
static tableName = 'tax_rate';
}
@mxstbr
mxstbr / en.js
Created September 12, 2020 07:28
We need your help to translate the https://feedback.fish widget into more languages! If you know a language, please help by posting a translation for these strings in a comment below.
const en = {
titles: {
default: `What's on your mind?`,
idea: `Share an idea`,
issue: `Report an issue`,
other: `Tell us anything!`,
},
categories: {
idea: `Idea`,
issue: `Issue`,
@timolins
timolins / react-homey-draft.js
Last active August 17, 2022 12:03
React Homey – A declarative way to home automation
/*
Disclaimer: This is just a drafted api and not real (yet).
*/
import { useState } from "react"
import ReactHomey, {
// Components
Light,
Fan,
@ugiacoman
ugiacoman / Client-Loading-Example.md
Last active June 24, 2022 20:50
SSR + CSR using next.js

Whether your component relies on client-side features or you are using 3rd party components that are not designed for server-side rendering, sometimes you'll want to defer rendering until on the client. For our example, we'll be using react-chart-2 to load a Doughnut chart.

Doughnut

You'll need a next project and to install chart.js + react-chartjs-2.

$ npm install --save chart.js react-chartjs-2  
@cvrebert
cvrebert / css_regression_testing.md
Last active May 9, 2023 12:13
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots