Skip to content

Instantly share code, notes, and snippets.

View kaytwo's full-sized avatar

Chris Kanich kaytwo

View GitHub Profile
@kaytwo
kaytwo / obsidian-web-clipper.js
Last active January 26, 2025 15:38 — 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)
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
const folder = "Clippings/";
/* Optional tags */
let tags = "clippings";
/// Readability: https://unpkg.com/@tehshrike/[email protected]
@kaytwo
kaytwo / atprotoOauthClient.ts
Created January 22, 2025 07:30
atproto OAuth client in CloudFlare Worker
import { JoseKey, type Importable } from "@atproto/jwk-jose";
import type { JWK } from "jose";
// should be usable with nodejs compat of 'node:dns/promises'
import { AppViewHandleResolver } from "@atproto-labs/handle-resolver";
import type { Jwk } from "@atproto/jwk";
// Preserve the original Request constructor
const OriginalRequest = globalThis.Request;
// Create a custom Request constructor

This issue has an attachment.

'use strict';
const puppeteer = require('puppeteer');
(async () => {
/* PRECONDITION:
0. download ublock, I used https://github.com/gorhill/uBlock/releases/download/1.14.19b5/uBlock0.chromium.zip
1. run $PATH_TO_CHROME --user-data-dir=/some/empty/directory --load-extension=/location/of/ublock
2. enable block lists you want to use
*/

Keybase proof

I hereby claim:

  • I am kaytwo on github.
  • I am kaytwo (https://keybase.io/kaytwo) on keybase.
  • I have a public key whose fingerprint is 4347 846B 1AB1 8112 3C11 DB7A 4BF5 8AF6 F19C 1645

To claim this, I am signing this object:

@kaytwo
kaytwo / httpd.conf
Created November 2, 2015 15:20
multiconference hotcrp
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html
<Directory "/home/ckanich/hotcrp">
Options Indexes FollowSymLinks Includes
AllowOverride all
Require all granted
</Directory>
Alias /conference1 /home/ckanich/hotcrp
python -c "from random import choice; print ''.join([choice('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%^*(-_=+)') for i in range(32)])"