Skip to content

Instantly share code, notes, and snippets.

View jokester's full-sized avatar
🌛
not my photo / still alive and with a cat now!!! (as of 2024-03)

Wang Guan jokester

🌛
not my photo / still alive and with a cat now!!! (as of 2024-03)
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrtcmn
mrtcmn / workaround.css
Created November 27, 2020 15:04
firefox backdrop-filter workaround
@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
.blurred-container {
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
}
}
/* slightly transparent fallback for Firefox (not supporting backdrop-filter) */
@supports not ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
.blurred-container {

Fibers

Fibers are an abstraction over sequential computation, similar to threads but at a higher level. There are two ways to think about this model: by example, and abstractly from first principles. We'll start with the example.

(credit here is very much due to Fabio Labella, who's incredible Scala World talk describes these ideas far better than I can)

Callback Sequentialization

Consider the following three functions

@digikar99
digikar99 / lisp-resources-digikar-2020.md
Last active November 9, 2023 04:35
If programming is more than just a means of getting things done for you, then Common Lisp is for you!
import React from 'react';
import type { Story, Meta } from '../storybook';
import { Button, ButtonProps } from './button';
export default {
title: 'React/Button',
component: Button,
argTypes: {
children: { name: 'label', control: 'text' },
},
@botagar
botagar / blerp.js
Created May 5, 2020 23:15
Javascript implementation of Bilinear Interpolation
Math.blerp = function (values, x1, y1, x2, y2, x, y) {
let q11 = (((x2 - x) * (y2 - y)) / ((x2 - x1) * (y2 - y1))) * values[x1][y1]
let q21 = (((x - x1) * (y2 - y)) / ((x2 - x1) * (y2 - y1))) * values[x2][y1]
let q12 = (((x2 - x) * (y - y1)) / ((x2 - x1) * (y2 - y1))) * values[x1][y2]
let q22 = (((x - x1) * (y - y1)) / ((x2 - x1) * (y2 - y1))) * values[x2][y2]
return q11 + q21 + q12 + q22
}
@shilman
shilman / storybook-controls-typescript-walkthrough.md
Last active May 22, 2022 06:49
Storybook Controls Walkthrough

Storybook Controls w/ CRA & TypeScript

This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Controls. It's also an introduction to Storybook Args, which is a major update to Storybook's Component Story Format (CSF): a more portable and ergonomic way to write stories.

This walkthrough gives you:

  • Auto-generated controls in the addons panel
  • Auto-generated controls in your Docs
  • Auto-generated actions for event logging
  • An introduction to the future of CSF
@TheJLifeX
TheJLifeX / 00-hand-gesture-recognition.gif
Last active April 18, 2024 21:53
Simple Hand Gesture Recognition Code - Hand tracking - Mediapipe
00-hand-gesture-recognition.gif
@fredrikbergqvist
fredrikbergqvist / Rss.ts
Created November 29, 2019 15:21
How to create an RSS feed for next.js
import React from "react";
import { NextPageContext } from "next";
const blogPostsRssXml = (blogPosts: IBlogPost[]) => {
let latestPostDate: string = "";
let rssItemsXml = "";
blogPosts.forEach(post => {
const postDate = Date.parse(post.createdAt);
if (!latestPostDate || postDate > Date.parse(latestPostDate)) {
latestPostDate = post.createdAt;
@noto
noto / 1on1.md
Last active March 23, 2024 14:01

これは私が支援先に提供した、1 on 1 に関するノウハウや、思いを述べたドキュメントを元にしています。企業の枠を超えて共有したいことが多いので、ここに貼ります。

概要

  • 世の中には 1 on 1 の本があるようですが、とりあえずは『1 on 1 で 何を話すのか? マネージャ/ソフトウェアエンジニアの立場から - サンフランシスコではたらくソフトウェアエンジニア』を読んでもらえればよいと思います (higepon さんに感謝!)。
  • 1 on 1 は 1 対 1 で話すミーティングで、基本定期的にやります。上長とメンバーとの間で行うのが基本です。
  • グループ/チームでのミーティングを補完するためのものです。
    • みんなの前では話しづらい、込み入った内容を話します。
    • チームとして行っているタスクの進捗確認に 1 on 1 を使うのは避けましょう。それは 1 on 1 の目的に沿っていません。
  • 基本、「メンバーの時間」と捉えてください。メンバーが話したいこと、上長に質問したいこと、相談したいことを話す時間です。
  • ですので、上長は相手の話をさえぎらず、聞くことに徹してください (話すのが得意な人、好きな人がマネージャになっている可能性が高いというバイアスに注意しましょうw)。