Skip to content

Instantly share code, notes, and snippets.

View jsit's full-sized avatar
👾

Jay Sitter jsit

👾
View GitHub Profile
@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: [email protected] (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: <[email protected]>
% References: <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]>
% NNTP-Posting-Host: pf157.warszawa.ppp.tpnet.pl
@jsit
jsit / .gitconfig
Created December 22, 2020 15:42
Git config with conditional to test Git version
[alias]
lg = "!if (( \
$(echo \"$(git --version | sed -E 's/git version ([0-9]+.[0-9]+).*/\\1/') > 2.20\" | bc) \
)); then \
DATE="--date=human"; \
else \
DATE="--date=short"; \
fi; \
git log --pretty=tiny --abbrev-commit --$DATE"
@jsit
jsit / fimoculous-blogs.opml
Last active September 14, 2020 17:50
fimoculous blogs of the year rss opml
<?xml version="1.0" encoding="UTF-8"?>
<opml>
<outline text="fimoculous">
<outline xmlUrl="http://amysrobot.com/index.rdf" />
<outline xmlUrl="http://busblog.tonypierce.com/feed" />
<outline xmlUrl="http://diablocody.blogspot.com/feeds/posts/default?alt=rss" />
<outline xmlUrl="http://earlboykins.blogspot.com/feeds/posts/default?alt=rss" />
<outline xmlUrl="http://eyeteeth.blogspot.com/feeds/posts/default?alt=rss" />
<outline xmlUrl="http://feeds.feedburner.com/Artsjournal" />
<outline xmlUrl="http://feeds.feedburner.com/Metafilter" />
@jsit
jsit / blogger-minima-blue.html
Last active January 4, 2020 22:31
Minima Blue Blogger Theme
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><$BlogPageTitle$></title>
<$BlogMetaData$>
<style type="text/css">
/*
@jsit
jsit / ag-filename-match.vim
Last active September 18, 2019 17:29
Native Vim search with Ag, including second parameter for filename match pattern
function! ParseAgList(...)
let l:string = join(a:000)
" http://vpaste.net/qTrzV
" Thanks irc://chat.freenode.net/m_ben,isnick
let l:pat = '\v%([^\\]\\)@<!\s+|([''"])%(.{-})\\@<!\1\zs\s*'
let l:args = split(l:string, pat)
if len(l:args) > 1
" sanitize
@jsit
jsit / GitHub File View Bookmarklets.md
Created December 20, 2018 19:35
GitHub File View Bookmarklets

GitHub File View Bookmarklets

Collapse JS

javascript:var%20files%20=%20document.querySelectorAll('.file-header[data-path$=".js"]%20.js-details-target[aria-expanded=true]');%20for%20(i%20=%200;%20i%20<%20files.length;%20i++)%20{%20files[i].click();%20}

Expand JS

javascript:var%20files%20=%20document.querySelectorAll('.file-header[data-path$=".js"]%20.js-details-target[aria-expanded=false]');%20for%20(i%20=%200;%20i%20<%20files.length;%20i++)%20{%20files[i].click();%20}

Show all comments

javascript:var%20files%20=%20document.querySelectorAll('.js-toggle-file-notes:not(:checked)');%20for%20(i%20=%200;%20i%20&lt;%20files.length;%20i++)%20{%20files[i].click();%20}

@jsit
jsit / .stylelintrc
Created August 7, 2017 15:19
.stylelintrc / stylelint-order rules for SMACSS property sort order
"order/properties-order": [
{ "properties": [ "content", "quotes" ] },
{ "properties": [ "display", "visibility" ] },
{ "properties": [ "position", "z-index", "top", "right", "bottom", "left" ] },
{ "properties": [ "box-sizing" ] },
{ "properties": [ "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "align-content", "align-items", "align-self", "justify-content", "order" ] },
{ "properties": [ "width", "min-width", "max-width", "height", "min-height", "max-height" ] },
{ "properties": [ "margin", "margin-top", "margin-right", "margin-bottom", "margin-left" ] },
{ "properties": [ "padding", "padding-top", "padding-right", "padding-bottom", "padding-left" ] },
@jsit
jsit / functions.php
Created April 17, 2017 16:17
Allow CodePen attributes in <p> tags
<?php
function add_allowed_tags($tags, $context) {
if ($context === 'post') {
$tags['p'] = array(
'data-height' => true,
'data-theme-id' => true,
'data-slug-hash' => true,
'data-default-tab' => true,
@jsit
jsit / functions.php
Last active April 17, 2017 16:06
Allow WordPress editors to post unfiltered HTML
function allow_editors_to_post_html() {
$role_object = get_role( 'editor' );
$role_object->add_cap( 'unfiltered_html' );
}
add_filter( 'admin_init', 'allow_editors_to_post_html' );
@jsit
jsit / pinboard-bookmarklet.js
Last active October 9, 2024 14:16
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) {