Skip to content

Instantly share code, notes, and snippets.

View piroor's full-sized avatar

YUKI "Piro" Hiroshi piroor

View GitHub Profile
@piroor
piroor / test.html
Created October 3, 2023 08:19
Hello World Html
<html>
<head>
<style>
h1 {
font-family: Calibri;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
@piroor
piroor / test.md
Created October 3, 2023 08:19
Hello World Markdown

Hello World

This is content converted from Markdown!

Here's a JSON sample:

{
  "foo": "bar"
}
@piroor
piroor / userContent.css
Last active January 14, 2023 06:08
Hide impressions counter on each tweet (for Firefox)
@-moz-document url-prefix("https://twitter.com/") {
a[aria-label*="件の表示。ツイートアナリティクスを表示"] span,
a[href$="/analytics"]:not([aria-label*="件の表示。ツイートアナリティクスを表示"]) div,
a[href^="/"][href*="/status/"][aria-describedby][aria-label*="年"][aria-label*="月"][aria-label*="日"] ~ span {
display: none !important;
}
}
@piroor
piroor / gist:d559859729a1f5d811744f2da6b9c668
Created December 21, 2022 10:15
demonstration of third-party tracker cookie
/*
Demonstration of third-party tracker cookie
Original: https://iq.opengenus.org/third-party-cookies/
How to run:
1. Download this as a file `demo.js`.
2. Run `npm install express` and `npm install cookie-parser`.
3. Run `node demo.js`.
4. Open `http://127.0.0.1:3000`, `http://127.0.0.2:3000`, and `http://127.0.0.3:3000` on your web browser.
5. Reload those tabs again and again.
@piroor
piroor / userContent.css
Last active November 20, 2022 06:22
userContent.css for Inoreader to shrink news feeds tagged as "ニュース"
@-moz-document url-prefix("https://www.inoreader.com/"),
url-prefix("https://jp.inoreader.com/") {
/* ニュース */
div[data-tags*="\\u30cb\\u30e5\\u30fc\\u30b9"]:not(#__no_existent),
div[data-tags*="\\u30cb\\u30e5\\u30fc\\u30b9"]:not(#__no_existent) * {
font-size: small !important;
padding: 0.2em !important;
}
div[data-tags*="\\u30cb\\u30e5\\u30fc\\u30b9"]:not(#__no_existent) img {
max-width: 50% !important;
@piroor
piroor / demo.html
Last active January 17, 2022 02:55
CSS Sytem Color Demo
<html>
<head>
<title></title>
<style type="text/css">
:root, body {
color-scheme: light dark;
font: message-box; /* this is same to Firefox's UI. */
line-height: 1;
}
ul, li {
@piroor
piroor / gentoc.js
Last active September 22, 2021 07:46
Generate Table of Contents Markdown code from HTML page
// Run this in the console of the web browser
(function generateToC() {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
if (headings.length == 0)
return;
let minLevel = 6;
for (let heading of headings) {
let headingLevel = parseInt(heading.localName.charAt(1));
if (headingLevel < minLevel)
minLevel = headingLevel;
@piroor
piroor / profiles.json
Created April 9, 2020 07:31
profiles.json for Windows Terminal
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
//"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
@piroor
piroor / find-and-open.js
Created February 6, 2020 01:54
Find AWS/Amazon developers from contributors
// Run this script with the web console for contributors list pages on your Web browser, for example:
// https://github.com/antirez/redis/graphs/contributors
// https://github.com/mongodb/mongo/graphs/contributors
// https://github.com/apache/kafka/graphs/contributors
(async () => {
let promises = [];
for (const url of Array.from(new Set(Array.from(document.querySelectorAll('a[href][data-hovercard-type="user"]'), link => link.href)))) {
const win = window.open(url);
promises.push(new Promise(resolve => {
win.addEventListener('DOMContentLoaded', () => {
@piroor
piroor / SelectionClipboard.ahk
Last active April 11, 2019 01:10
AutoHotKey https://www.autohotkey.com/ script to simuate "selection clipboard" behavior of Linux desktop environments
; Simulate "Selection Cipboard" of Linux desktop environments
; Based on:
; https://softwarerecs.stackexchange.com/questions/9791/copy-selection-to-clipboard-automatically
; Usage:
; 1. Install AutoHotKey: https://www.autohotkey.com/
; 2. Save this file as "SelectionClipboard.ahk".
; 3. Put it into the startup folder.
; Note:
; * Ctrl-C will be sent when you do drag and drop with the left button always, including
; window moving and resizing. This means that SIGINT is sent to appls when you try to