Skip to content

Instantly share code, notes, and snippets.

View jsit's full-sized avatar
👾

Jay Sitter jsit

👾
View GitHub Profile
@jsit
jsit / pinboard-bookmarklet.js
Last active January 17, 2024 16:15
Pinboard Bookmarklet -- Use text selection for description if available, otherwise use meta description, and include referrer in description if exists.
javascript: q = location.href;
q = q.replace(/[?&]utm_[^&]*/g, "");
q = q.replace(/[?&]mc_[^&]*/g, "");
q = q.replace(/[?&]src=[^&]*/g, "");
q = q.replace(/[?&]ref=[^&]*/g, "");
desc = "";
if (document.getElementsByName("description").length > 0) {
desc = document.getElementsByName("description")[0].getAttribute("content")
"\n\n"
} else if (document.getElementsByName("Description").length > 0) {
@jsit
jsit / sieve.sieve
Last active May 9, 2023 05:56
Notifications / mailing lists / bulk email sieve code (for e.g. Fastmail et al.)
if
# Tests for "Mailing Lists"
anyof(
header :is "X-ME-VSCategory" "community:mailing-list",
header :contains "X-Mailer" "Sympa",
exists [
"List-Id",
"List-Help",
"List-Subscribe",
"List-Unsubscribe",
@jsit
jsit / covid-levels.js
Last active February 16, 2023 19:19
COVID-19 Levels widget for Scriptable
/**
* COVID-19 Tracker Widget
*
* Enter your county and state as "Example County, Connecticut" in the widget
* "Parameter". Be sure to include the word "County" in the county name.
*
* If unsure how the CDC spells your county, find values here:
* https://data.cdc.gov/Public-Health-Surveillance/United-States-COVID-19-Community-Levels-by-County/3nnm-4jni
*
* Script by Jay (@jsit@social.coop)
@jsit
jsit / Mastodon Explained in 100 Words.md
Last active January 26, 2023 17:15
Mastodon Explained in 100, 200, and 500 Words

Mastodon Explained in 100 Words

  1. Mastodon is a microblogging social media platform like Twitter; you can write posts ("toots") and interact with other people's posts on a timeline.
  2. To sign up, you first need to choose a server (an "instance"), like choosing an email provider.
  3. Start posting!
  4. It's probably adequate to start with the official app made by the Mastodon group.
  5. There are three timelines; "Home" shows posts from people you follow; "Local" shows posts from people who are on your instance; "Federated" shows posts from all people known to your instance.
  6. You may notice some differences and limitations in the experience as compared to Twitter.
@jsit
jsit / kill_idiot.sl
Created June 22, 2021 21:33
Kill messages from user and all replies to messages from user in slrn
% Path: pingwin.icm.edu.pl!agh.edu.pl!news.wnaft.agh.edu.pl!news.memax.krakow.pl!news.sim.pl!lublin.pl!uw.edu.pl!news.nask.pl!orion.cst.tpsa.pl!news.task.gda.pl!news.icm.edu.pl!home.extravaganza.pl!jr211
% From: jr211@students.mimuw.edu.pl (Jan Rekorajski)
% Newsgroups: pl.comp.os.advocacy
% Subject: Re: Dajcie =?iso-8859-2?Q?ju=BF_spok=F3j?= Expertowi
% Date: 12 Apr 1999 02:38:42 GMT
% Organization: The Shire
% Lines: 249
% Message-ID: <slrn7h2n5i.17q.jr211@home.extravaganza.pl>
% References: <N6VM2.4295$_u5.498155@news.tpnet.pl> <370A77BD.7FDDBAED@vela.filg.uj.edu.pl> <Pine.LNX.4.02.9904070915210.829-100000@manjak.knm.org.pl> <c7g16c39by.fsf@home.bti.pl> <slrn7gn3dv.s0.druzus@uran.nat.org.pl> <370BD987.C4BDC2D8@fnet.pl>
% NNTP-Posting-Host: pf157.warszawa.ppp.tpnet.pl
@jsit
jsit / webdev.goggles
Last active July 8, 2022 20:27
Web Development Goggles
! name: Web Development Sites
! description: Search nothing but web development sites
! public: false
! author: Jay Sitter
$discard
$boost,site=css-tricks.com
$boost,site=smashingmagazine.com
$boost,site=alistapart.com
$boost,site=csswizardry.com
@jsit
jsit / functions.php
Last active May 29, 2022 17:03
Customize WordPress comment form output
<?php
/**
* Rewrite the HTML for the author, email, and url comment fields
*/
function custom_comment_fields( $fields ) {
// https://codex.wordpress.org/Function_Reference/comment_form
$commenter = wp_get_current_commenter();
@jsit
jsit / kottke-recommends.opml
Last active May 11, 2022 14:24
Kottke Recommends OPML
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
<head>
<title>Kottke Recommended Follows</title>
</head>
<body>
<outline text="Kottke Recommends" title="Kottke Recommends">
<outline title="A Thing Or Two" xmlUrl="https://www.athingortwohq.com/newsletter?format=rss"/>
<outline title="A Whole Lotta Nothing" xmlUrl="https://a.wholelottanothing.org/feed/"/>
<outline title="Anil Dash" xmlUrl="https://anildash.com/rss/"/>

Keybase proof

I hereby claim:

  • I am jsit on github.
  • I am jays (https://keybase.io/jays) on keybase.
  • I have a public key whose fingerprint is 0B61 0F1F 2188 2218 5930 D6A9 CF75 BDF8 9AA7 EF4D

To claim this, I am signing this object:

@jsit
jsit / Wordle Streak Transfer.txt
Last active February 27, 2022 05:05
Wordle Streak Transfer
https://www.nytimes.com/games/wordle/index.html?data={%22statistics%22:{%22currentStreak%22:32,%22maxStreak%22:32,%22guesses%22:{%221%22:0,%222%22:1,%223%22:5,%224%22:20,%225%22:11,%226%22:6,%22fail%22:1},%22winPercentage%22:98,%22gamesPlayed%22:44,%22gamesWon%22:43,%22averageGuesses%22:4}}