Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Lins tobiaslins

View GitHub Profile
@timolins
timolins / react-homey-draft.js
Last active Apr 1, 2021
React Homey – A declarative way to home automation
View react-homey-draft.js
/*
Disclaimer: This is just a drafted api and not real (yet).
*/
import { useState } from "react"
import ReactHomey, {
// Components
Light,
Fan,
@cvrebert
cvrebert / css_regression_testing.md
Last active Mar 17, 2021
Survey of screenshot-based CSS testing tools
View css_regression_testing.md

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
@dsumer
dsumer / TaxRateModel.ts
Last active Mar 8, 2021
Apply the correct VAT Rate to your customer in Stripe Checkout
View TaxRateModel.ts
import { Model } from 'objection';
export default class TaxRateModel extends Model {
countryCode!: string;
stripeId!: string;
static tableName = 'tax_rate';
}
@ugiacoman
ugiacoman / Client-Loading-Example.md
Last active Jan 6, 2021
SSR + CSR using next.js
View Client-Loading-Example.md

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  
@mxstbr
mxstbr / en.js
Created Sep 12, 2020
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.
View en.js
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`,