Skip to content

Instantly share code, notes, and snippets.

View knownasilya's full-sized avatar
🦾
Working on Archegos

Ilya Radchenko knownasilya

🦾
Working on Archegos
View GitHub Profile
import {
createRouter,
createBrowserHistory,
UNSAFE_ErrorResponseImpl as ErrorResponseImpl
} from "@remix-run/router";
import {
RouteObject,
UNSAFE_mapRouteProperties as mapRouteProperties,
} from "react-router";
@passivestar
passivestar / Editor.tres
Last active April 10, 2024 20:07
Godot editor theme
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"]
content_margin_left = 10.5
content_margin_top = 8.75
content_margin_right = 10.5
content_margin_bottom = 8.75
bg_color = Color(0.117647, 0.117647, 0.117647, 1)
draw_center = false
border_color = Color(1, 1, 1, 0.137255)
@diegohaz
diegohaz / query.ts
Last active November 30, 2023 21:07
import {
queryByLabelText,
queryByRole,
queryByText,
} from "@testing-library/dom";
import type { ByRoleOptions, Matcher } from "@testing-library/dom";
const roles = [
"alert",
"alertdialog",
@steveruizok
steveruizok / App.tsx
Created August 17, 2023 17:24
history scrubbing in tldraw
import '@tldraw/tldraw/tldraw.css'
import { RecordsDiff, TLRecord, Tldraw, useEditor } from '@tldraw/tldraw'
import { useEffect, useRef } from 'react'
export default function App() {
return (
<div className="tldraw__editor">
<Tldraw autoFocus>
<Slider />
</Tldraw>
@joshcho
joshcho / reactive_render.cljc
Last active January 5, 2024 06:02
Delight, Generating Interactive Controls over Electric Code
;; This is free and unencumbered software released into the public domain.
;;
;; Anyone is free to copy, modify, publish, use, compile, sell, or
;; distribute this software, either in source code form or as a compiled
;; binary, for any purpose, commercial or non-commercial, and by any
;; means.
;;
;; In jurisdictions that recognize copyright laws, the author or authors
;; of this software dedicate any and all copyright interest in the
;; software to the public domain. We make this dedication for the benefit
@coderberry
coderberry / github-review-toggle-checkboxes.js
Created December 15, 2022 19:12
Inserts a button that can toggle the "viewed" checkboxes when reviewing a PR on Github.
const url = document.URL;
class ReviewToggle {
insertButton() {
const parentElement = document.querySelector(".pr-review-tools");
let button = document.querySelector('#boost-toggle-checkboxes');
if (!button) {
button = document.createElement("button");
button.id = "boost-toggle-checkboxes";
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Orb | Render a custom-styled graph</title>
<script src="https://unpkg.com/@memgraph/orb@0.0.2/dist/browser/orb.js"></script>
<style>
html, body {
height: 100%;
margin: 0;
@maxfierke
maxfierke / cancelable-fetch.js
Last active April 21, 2022 18:15
cancelableFetch Yieldable ember-concurrency
import { Yieldable } from 'ember-concurrency';
import fetch from 'fetch'; // i.e. ember-fetch. could also use native fetch too.
class FetchYieldable extends Yieldable {
constructor(url, opts = {}) {
super(...arguments);
this.url = url;
this.opts = opts;
}
@pfrazee
pfrazee / videos.js
Created May 27, 2021 01:28
Script for encoding & compressing MP4s in the browser
import bytes from '../../vendor/bytes/index.js'
const MAX_WIDTH = 600
const MAX_HEIGHT = 600
const { createFFmpeg, fetchFile } = FFmpeg
let ffmpeg
export async function compressAndGetThumb (file, maxVideoSize, progressCb) {
const objectUrl = URL.createObjectURL(file)
const videoEl = document.createElement('video')
videoEl.addEventListener('error', console.log)
@gitKrystan
gitKrystan / README.md
Last active November 7, 2023 18:43
ember-cli-mirage types

Skylight ember-cli-mirage Types

These types were written by the team at https://www.skylight.io/, specifically @gitKrystan (with lots of help from @chancancode).

Gist filenames don't allow slashes, so I replaced them with :.

Before you start

Add "<app-name>/mirage/*": ["mirage/*"] to your paths config in your tsconfig.json