Skip to content

Instantly share code, notes, and snippets.

View chrisaldrich's full-sized avatar

Chris Aldrich chrisaldrich

View GitHub Profile
@TfTHacker
TfTHacker / Hypothesidian.js
Last active January 16, 2024 20:52
Hypothes.is - retrieve your annotations into Obsidian (for templater plugin)
<%*
/*
# Hypothes.idian a templater script for retrieving annotations from Hypothes.is
Dev: TfTHacker https://twitter.com/TfTHacker
# Prerequisites:
+ Templater plugin by https://github.com/SilentVoid13/Templater
+ Free Hypothes.is developer token from: https://hypothes.is/account/developer
+ This script will prompt you for his token and save it to a file called "hypothesis config.md"
+ This file store your configuration and can be located any where in your vault.
@jborichevskiy
jborichevskiy / jon-roam-daily-template.md
Last active August 31, 2022 04:41
The daily template I use for Roam Research https://roamresearch.com/
  • Weekly Agenda (created on a different day, and embedded with /Block Reference)
  • [[Morning Questions]]
    • {{[[slider]]}} How many hours of sleep did I get?
    • What's one thing top of mind today?
    • What's the one thing I need to get done today to make progress?
    • Review #[[Index: Questions]] #values
  • Agenda
    • {{[[TODO]]}} Morning walk #goal-health #habit
    • {{[[TODO]]}} Check calendar for scheduled events
  • {{[[TODO]]}} Morning focus hour
@dshanske
dshanske / kind-register.php
Created December 14, 2018 00:59
Example Plugin for Registering Kinds(untested)
<?php
/**
* Plugin Name: Register Post Kind - Name
* Plugin URI: https://example.com
* Description: Register Post Kind
* Version: None
* Author:
* Author URI:
* Text Domain:
* Domain Path:
@jbrown123
jbrown123 / readme.md
Last active October 9, 2023 18:58
Reference bookmarklet - generate a string containing the page title, URL and any selected text

Reference bookmarklet

This bookmarklet will grab 2 or 3 bits of info from the currently viewed webpage and put them into an 'alert' so you can copy & paste into another document.

It should work in any desktop browser (chrome, firefox, ect.) on any OS but I've only personally tested it in Chrome on Windows.

You can press either enter or escape after copying the text. It doesn't make any difference which one you use.

For example, the above URL points to the bookmarklet entry on Wikipedia. If you used the reference bookmarklet on that page it would return the following:

@xavierroy
xavierroy / kind-listen.php
Last active July 31, 2018 16:40
This adds triple tags for audio posts. The file is indieweb-post-kinds/views/kind-listen.php. For this to work, you should have some tags available in the Tags section for your Post Kind metadata.
<?php
/*
Listen Template
*
*/
$mf2_post = new MF2_Post( get_the_ID() );
$cite = $mf2_post->fetch();
if ( ! $cite ) {
return;
@Zegnat
Zegnat / authdiag.php
Last active August 7, 2018 15:50
Upload to a web server on an accessible path. Navigate to it in the browser. Copy the URL from the address bar and paste it in the form. Run the test to see if your server gets Authorization headers!
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$auth = filter_input(
INPUT_POST,
'auth',
FILTER_VALIDATE_REGEXP,
array('options' => array('regexp' => '@^authtest_\d+$@'))
@gRegorLove
gRegorLove / functions.php
Last active April 2, 2018 02:21
WordPress filter to approve webmentions from previously-approved domains
<?php
if ( !function_exists('indieweb_check_webmention') ) {
/**
* Using the webmention_source_url, approve webmentions that have been received from previously-
* approved domains. For example, once you approve a webmention from http://example.com/post,
* future webmentions from http://example.com will be automatically approved.
* Recommend placing in your theme's functions.php
*
@keithjgrant
keithjgrant / abp-twitter.txt
Last active August 31, 2023 20:48
Adblock plus filters to remove the crap from twitter
twitter.com##.module.trends
twitter.com##.wtf-module
twitter.com##[data-component-context="suggest_activity_tweet"]
twitter.com##.nav>.moments
twitter.com##.LiveVideoHomePageModuleContainer
@troutcolor
troutcolor / micoblog_functions.php
Last active August 10, 2020 16:27
functions that have do with micro.blog and microblogging that live in my child theme's functions.php
<?php // Opening PHP tag - nothing should be before this, not even whitespace
//Micro.blog//
/*
updated 2018-01-29
this is just the micro.blog stuff I've added to my child theme's function php
Hopefully most of the credits are noted below