Skip to content

Instantly share code, notes, and snippets.

@lumynou5
lumynou5 / youtube-commenter-names.user.js
Last active August 18, 2026 08:06
Make YouTube display the names of commenters instead of their handles.
// ==UserScript==
// @name YouTube Commenter Names
// @version 1.13.0
// @description Make YouTube display the names of commenters instead of their handles.
// @author Lumynous
// @license MIT
// @match https://www.youtube.com/*
// @match https://music.youtube.com/*
// @match https://studio.youtube.com/*
// @exclude https://www.youtube.com/persist_identity

Wayland桌面工作階段會帶來許多問題,其中最常見的就是瀏覽器效能下降的問題。因為有些瀏覽器預設跑在XWayland模式,所以看起來會卡卡的。所以要手動啟用Wayland模式。但是有的瀏覽器啟用Wayland模式反而出現了其他問題,下面就要來討論如何解決這些問題。

下列操作適用Ubuntu 24.04 LTS以上版本的系統。

1. 如何確認自己是使用Wayland工作階段

使用echo $XDG_SESSION_TYPE指令即可得知是目前桌面工作階段x11還是wayland。

GNOME 42以上版本預設使用Wayland,登入畫面GDM右下角齒輪會有GNOME與GNOME on Xorg的選項。

@MartinEesmaa
MartinEesmaa / youtube_formats.md
Last active November 7, 2026 19:09 — forked from AgentOak/youtube_formats.md
Youtube Format IDs

Note: This is all almost full YouTube ID informations. Original owner goes to AgentOak, modified version by Martin Eesmaa.

See the credits and also special thanks in below.

Before this gist has been forked, AgentOak made original gist back in November 13th 2019 and it was last updated on May 5th 2021.

From now on, this forked gist is maintained by Martin Eesmaa since 17th September 2022. I joined to yt-dlp Discord server on 3rd April 2026 with my Discord username: martineesmaa.

Last updated: 11 October 2026

React.js Github Repo Spammed

Background

React's official website makes a banner, which offers visitors a way to provide humanitarian aid to Ukraine.
React的官方网站做了一个横幅,为访问者提供了向乌克兰提供人道主义援助的途径。

telegram-cloud-photo-size-5-6127611897286078767-x

Then, many people went to the React.js Github repository and opened lots of spam issues with anti-US and anti-Ukrainian comments in an apparent form of digital protest. The messages are in English and Mandarin.
然后,很多人到React.js Github 仓库中开了很多带有反美国和反乌克兰 issue,进行一种数字化的抗议。这些信息是用英语和普通话写的。

@PierBover
PierBover / Example.svelte
Last active July 24, 2026 04:57
Keep alive Svelte action
<script>
import keepAlive from "./action.js";
import Component from './Component.svelte';
</script>
<div use:keepAlive={{id: 'some-manual-id', componentClass: Component}}/>
@chengsokdara
chengsokdara / useStore.js
Last active June 20, 2024 10:09
React global state in 15 lines of code.
// Author: Sokdara Cheng
// Contact me for web or mobile app development using React or React Native
// https://chengsokdara.github.io
import React, { createContext, useContext, useReducer } from "react";
import initialState from "./initialState"; // object of initial states
import reducer from "./reducer"; // https://reactjs.org/docs/hooks-reference.html#usereducer
const Store = createContext({
dispatch: () => null,
state: initialState,
});
@Isaddo
Isaddo / mobileBarcodeValidator.js
Last active December 30, 2025 04:43
用 regular expression 驗證電子發票手機條碼格式 。E-invoice mobile barcode validator by regular expression.
/*
* 第 1 碼為 /
* 其餘 7 碼為 0-9 A-Z . - +
*/
module.exports = (value) => {
// - 需放最後,不然要會跟 0-9 的 - 混淆
const patt = /^\/[0-9A-Z.+-]{7}$/
if (patt.test(value)) return null
@alexandrebodin
alexandrebodin / index.js
Created February 14, 2020 10:51
Upload image wiht graphql
import React from "react";
import "./App.css";
import { ApolloProvider } from "@apollo/react-hooks";
import gql from "graphql-tag";
import { ApolloClient } from "apollo-client";
import { createUploadLink } from "apollo-upload-client";
import { InMemoryCache } from "apollo-cache-inmemory";
@v1vendi
v1vendi / api_generator.js
Created August 20, 2019 19:19
REST API functional generator
const fetch = (...args) => console.log(...args) // mock
function httpRequest(url, method, data) {
const init = { method }
switch (method) {
case 'GET':
if (data) url = `${url}?${new URLSearchParams(data)}`
break
case 'POST':
case 'PUT':
case 'PATCH':
@gagarine
gagarine / fish_install.md
Last active November 5, 2026 11:40
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish