Skip to content

Instantly share code, notes, and snippets.

@zoubingwu
zoubingwu / gist:a374e532c9f7d9817c7546e8b72f78c2
Last active September 28, 2023 18:09
jabletv m3u8 getter
// ==UserScript==
// @name jabletv m3u8 getter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description copy m3u8 url on jabletv
// @author You
// @match https://jable.tv/videos/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=jable.tv
// @grant none
// ==/UserScript==
@zoubingwu
zoubingwu / main.js
Last active May 17, 2024 15:40
Twitter insta block
// ==UserScript==
// @name Twitter Insta Block
// @namespace your-namespace-here
// @version 3
// @description Adds a "Block User" button on Twitter timeline conversations and blocks the user with one click
// @author zoubingwu
// @match https://x.com/*
// @grant none
// ==/UserScript==
YAML 57 mins ██████▒░░░░░░░░░░░░░ 16.8%
JavaScript 56 mins ██████░░░░░░░░░░░░░░ 16.4%
TypeScript 54 mins ██████░░░░░░░░░░░░░░ 16.0%
Markdown 50 mins █████▓░░░░░░░░░░░░░░ 14.6%
@zoubingwu
zoubingwu / nginx.conf
Created September 7, 2020 09:20
cors local nginx
worker_processes 1;
events {
worker_connections 1024;
}
http {
sendfile on;
keepalive_timeout 65;
gzip on;
@zoubingwu
zoubingwu / useInfiniteScroll.js
Created July 2, 2020 04:37
infinite scroller hook
import { useRef, useCallback } from "react";
function useInfiniteScroll(doSomething) {
const ticking = useRef(false);
const enteredRedZone = useRef(false);
return useCallback(
event => {
if (!ticking.current) {
event.persist();
@zoubingwu
zoubingwu / javascript_ANSI_escape_codes.md
Last active October 25, 2019 09:44 — forked from leommoore/javascript_ANSI_escape_codes.md
JavaScript - ANSI Escape Codes

#JavaScript - ANSI Escape Codes

ANSI Escape Codes are special characters which can be used to control formatting, colors or other output preferences in a text terminal. Escape Codes are non-printing code and will not appear in the output directly.

  • \033 begins the escape sequence
  • [ indicates the color
  • 33 is the foreground color for yellow
  • m indicates the end of the setting

Note: \033[39m is used set the color back to the terminal defult

@zoubingwu
zoubingwu / switch.reg
Last active June 3, 2019 16:48
switch ctrl-alt key on windows
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,38,00,1d,00,1d,00,38,00,38,e0,1d,e0,1d,e0,38,e0,00,00,00,00
@zoubingwu
zoubingwu / fireworks.scss
Created January 4, 2019 03:36
pure css fireworks
// original: https://codepen.io/yshlin/pen/ylDEk
$particles: 60;
$width: 500;
$height: 500;
// Create the explosion...
$box-shadow: ();
$box-shadow2: ();
@for $i from 0 through $particles {
@zoubingwu
zoubingwu / Notification_Area_Cleaner.bat
Created July 26, 2018 03:17
a bat script that cleans windows notification area.
@echo off
echo - Notification Area Cleaner Script by Raymond.cc -
echo.
set regkey=HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify
choice /m "Backup TrayNotify key to Desktop"
if %errorlevel% == 1 reg export "%regkey%" %userprofile%\desktop\TrayNotifyBackup.reg /y
echo.
@zoubingwu
zoubingwu / iterm2-solarized.md
Created May 26, 2018 10:39 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k