Skip to content

Instantly share code, notes, and snippets.

import React, { useState, useEffect, useRef, useContext } from 'react';
import VisibilitySensor from 'react-visibility-sensor';
import { el, resolve } from '@elemaudio/core';
import srvb from '@elemaudio/srvb';
import Chrome from '../components/Chrome';
import Article from '../components/Article';
import ResizingCanvas from '../components/ResizingCanvas';
import { RenderContext, RenderContextProvider } from './RenderContext';
@lewangdev
lewangdev / default.custom.yaml
Last active March 28, 2024 09:54
雾凇拼音自定义配置,MacOS-like & Wechat-like Dark/Light Color Scheme For Rime
patch:
# 菜单
menu:
page_size: 8 # 候选词个数
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键
# ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
# 中西文切换
#
# 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。
@Rukh
Rukh / URLRequest+cURL.swift
Last active March 28, 2024 09:53 — forked from abhi21git/ExtensionURLRequest.swift
Swift cURL Printer
//
// URLRequest+cURL.swift
//
// Created by Dmitry Gulyagin on 19/02/2024.
//
import struct Foundation.URLRequest
public extension URLRequest {
@krisleech
krisleech / renew-gpgkey.md
Last active March 28, 2024 09:50
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@kangtastic
kangtastic / md4.py
Last active March 28, 2024 09:48
An implementation of the MD4 hash algorithm in pure Python 3.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © 2019 James Seo <james@equiv.tech> (github.com/kangtastic).
#
# This file is released under the WTFPL, version 2 (wtfpl.net).
#
# md4.py: An implementation of the MD4 hash algorithm in pure Python 3.
#
# Description: Zounds! Yet another rendition of pseudocode from RFC1320!
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 09:47
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯