Skip to content

Instantly share code, notes, and snippets.

View Flaque's full-sized avatar
。・:*:・゚★,。・:*:・゚☆

Evan Conrad Flaque

。・:*:・゚★,。・:*:・゚☆
View GitHub Profile
@Flaque
Flaque / oom
Created December 2, 2022 23:04
<--- Last few GCs --->
[69783:0x130040000] 12377858 ms: Scavenge (reduce) 4077.1 (4108.5) -> 4076.3 (4108.5) MB, 0.5 / 0.0 ms (average mu = 0.999, current mu = 0.922) allocation failure;
[69783:0x130040000] 12378320 ms: Mark-sweep (reduce) 4220.0 (4251.6) -> 4216.2 (4248.6) MB, 130.4 / 0.0 ms (+ 0.1 ms in 1 steps since start of marking, biggest step 0.1 ms, walltime since start of marking 461 ms) (average mu = 0.998, current mu = 0.875)
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0x102993e9c node::Abort() [/opt/homebrew/Cellar/node/18.9.1/bin/node]
2: 0x10299514c node::ModifyCodeGenerationFromStrings(v8::Local<v8::Context>, v8::Local<v8::Value>, bool) [/opt/homebrew/Cellar/node/18.9.1/bin/node]
@Flaque
Flaque / retention.sql
Created August 25, 2021 22:16
30 day retention in SQL
with cohorts as (
select id as user_id, date_trunc('day', created_at) as started_at from users group by 1, 2
)
,logins as (
select
distinct on (user_id, time_between)
user_id,
started_at,
checkin.happened_at,
import {
DetailedHTMLProps,
CanvasHTMLAttributes,
useLayoutEffect,
useEffect,
useRef,
createContext,
useContext,
Ref,
MutableRefObject,
import { RoomService } from "@roomservice/browser";
import { useEffect, useState } from "react";
const client = new RoomService({
auth: "/api/roomservice",
});
function useRoom(name) {
const [room, setRoom] = useState();
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hey folks

This is a small overview of common Javascript tools.

What's npm?

NPM is the "node package manager". It's a command-line tool you use to download code that other people wrote that you can use in your own projects.

package.json is a config file

const fs = require("fs");
const getPathsForArticles = () =>
fs
.readdirSync("./content/articles")
.map(blogName => {
const trimmedName = blogName.substring(0, blogName.length - 3);
return {
[`/${trimmedName}`]: {
page: "/[slug]",
@Flaque
Flaque / howdy.png
Last active January 31, 2023 18:54
howdy.png

Formatting on Tildes

Tildes uses a variation of a special formatting language called Markdown. If you're familiar with markdown, you should feel right at home. If not, then this doc is for you!

Special Tildes syntax

First, let's talk about some of the special ways to link to other things on Tildes.

Linking to groups

Keybase proof

I hereby claim:

  • I am flaque on github.
  • I am flaque (https://keybase.io/flaque) on keybase.
  • I have a public key ASBKbfLmvpMSJp5SgvFxo9INTfs1vRWmv2jbrVQvXg8MFQo

To claim this, I am signing this object: