Skip to content

Instantly share code, notes, and snippets.

View NetOpWibby's full-sized avatar
🌿
imagine being mad, touch grass

netop://ウィビ NetOpWibby

🌿
imagine being mad, touch grass
View GitHub Profile
@NetOpWibby
NetOpWibby / obsidian-web-clipper.js
Created February 20, 2024 03:13 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@NetOpWibby
NetOpWibby / full-match.js
Created June 25, 2023 02:34 — forked from sethlopezme/full-match.js
Regex for matching any hex, rgb(a), or hsl(a) value. Assumes that you've lowercased the string and removed spaces.
/^(#?([a-f\d]{3,4}|[a-f\d]{6}|[a-f\d]{8})|rgb\((0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d)\)|rgba\((0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|0?\.\d|1(\.0)?)\)|hsl\((0|360|35\d|3[0-4]\d|[12]\d\d|0?\d?\d),(0|100|\d{1,2})%,(0|100|\d{1,2})%\)|hsla\((0|360|35\d|3[0-4]\d|[12]\d\d|0?\d?\d),(0|100|\d{1,2})%,(0|100|\d{1,2})%,(0?\.\d|1(\.0)?)\))$/
import * as React from "react";
import { useMousePosition } from "~/hooks/useMousePosition";
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) {
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {};
const [mouseX, mouseY] = useMousePosition();
const positions = { x, y, h, w, mouseX, mouseY };
return (
<div
// USAGE: hsd --log-console=false --plugins=/path/to/this/file/expiring-plug.js
'use strict';
const {
Namestate,
Network
} = require('hsd');
const plugin = exports;
@NetOpWibby
NetOpWibby / gist:dccd404d2f60b8ff75eec6faa37a4226
Created January 22, 2022 07:44 — forked from tndata/gist:313688ffe2e2d24b676e2264a9943d5c
Sega MegaDrive development kit debugger
******************************************
*SEGA Megadrive comunication program *
*(c) 1991 Synchron Assembly *
*https://www.tn-data.se *
******************************************
*f1=trace, f2=skip instruction f4=go
*d xxxx set dissasm window, d pc
*m xxxx set memory window, m pc
*j xxxx set sega PC
@NetOpWibby
NetOpWibby / download-video.md
Created December 21, 2021 05:57 — forked from arijusg/download-video.md
Download stream video
@NetOpWibby
NetOpWibby / tracker_blocking.rb
Created July 30, 2020 21:33 — forked from dhh/tracker_blocking.rb
Current list of spy pixels named'n'shamed in HEY, as of April 23, 2020
module Entry::TrackerBlocking
extend ActiveSupport::Concern
included do
has_many :blocked_trackers
end
email_service_blockers = {
"ActiveCampaign" => /lt\.php(.*)?l\=open/,
"AWeber" => "openrate.aweber.com",
@NetOpWibby
NetOpWibby / TurnipPrices.cpp
Created April 7, 2020 19:30 — forked from Treeki/TurnipPrices.cpp
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@NetOpWibby
NetOpWibby / README.md
Created February 20, 2020 04:32 — forked from miku/README.md
git --track vs --set-upstream vs --set-upstream-to

README

Short excursion into git --track, --set-upstream and --set-upstream-to.

All examples use the aliases co for checkout and br for branch.

Setup:

$ git clone [email protected]:AKSW/OntoWiki.git

@NetOpWibby
NetOpWibby / prettySortByKeys.js
Created February 18, 2020 23:18 — forked from aleph-naught2tog/prettySortByKeys.js
Sort an object by keys
const sortByKeysLegibly = maybeObject => {
// presumably we want the array to stay ordered. Possibly not, but if there is
// anything that should preserve order, it's an array
if (maybeObject instanceof Array) {
return maybeObject;
}
// don't sort strings etc
if (typeof maybeObject !== 'object') {
return maybeObject;