This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub PDF Raw Link | |
// @namespace raw-pdf.github.hyrious.me | |
// @match https://github.com/* | |
// @grant none | |
// @version 1.0 | |
// @author hyrious | |
// @description Replace PDF file's link with its raw link | |
// @require https://cdn.jsdelivr.net/npm/selector-set@1.1.5/selector-set.js | |
// @require https://cdn.jsdelivr.net/npm/selector-observer@2.1.6/dist/index.umd.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -shared -Os -s -o a.dll -m32 mouse-wheel.c | |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
HHOOK hook; | |
DWORD delta; | |
LRESULT CALLBACK LowLevelMouseProc(_In_ int nCode, _In_ WPARAM wParam, _In_ LPARAM lParam) { | |
if (wParam == WM_MOUSEWHEEL) { | |
MSLLHOOKSTRUCT *mouse = (MSLLHOOKSTRUCT *)lParam; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="worker" src="data:,"> | |
// the empty "src" prevents code inside this block from being executed! | |
// this is the source code of the worker. | |
postMessage("Hello world!") | |
</script> | |
<script> | |
var blob = new Blob([document.getElementById('worker').textContent], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Wall -Wextra -pedantic -Wimplicit-fallthrough -Wsequence-point -Wswitch-default -Wswitch-unreachable -Wswitch-enum -Wstringop-truncation -Wbool-compare -Wtautological-compare -Wfloat-equal -Wshadow=global -Wpointer-arith -Wpointer-compare -Wcast-align -Wcast-qual -Wconversion -Wwrite-strings -Wdangling-else -Wlogical-op |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="style.css"> | |
<script src="favicon.js"></script> | |
<script src="theme.js"></script> | |
<title>Ruby Marshal Visualization</title> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os from "node:os"; | |
import fs from "node:fs"; | |
import path from "node:path"; | |
import cp from "node:child_process"; | |
/** | |
* ```js | |
* rb_eval(`p 1`) => '1' | |
* ``` | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var IDX = 256, HEX: string[] = []; | |
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1); | |
/** | |
* @param algorithm only "SHA-1", "SHA-256", "SHA-384", "SHA-512". | |
* | |
* **Note**: "SHA-1" is not recommended. | |
*/ | |
export async function digestHex(algorithm: AlgorithmIdentifier, data: string | BufferSource): Promise<string> { | |
if (typeof data === "string") data = new TextEncoder().encode(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log((await import('/usr/local/lib/node_modules/env-paths/index.js').then(e => e.default))(process.argv[2] || 'electron', {suffix: ''})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Read the code in NPM Browser | |
// @namespace goto-npm-browser.hyrious.me | |
// @match https://www.npmjs.com/package/* | |
// @grant none | |
// @version 1.0 | |
// @author hyrious | |
// @description Change the Code tab to goto https://hyrious.me/npm-browser | |
// ==/UserScript== | |
void function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "$(gh pr view --json url -q .url)/commits/$(git rev-parse --short HEAD)" |