Skip to content

Instantly share code, notes, and snippets.

@lockcp
lockcp / export_pinboard.py
Created April 14, 2021 16:44 — forked from dlo/export_pinboard.py
Export all Pinboard.in bookmarks with a specific tag.
#!/usr/bin/env python
"""
This script is designed to generate a simple HTML file with _all_ of your
Pinboard.in bookmarks.
You should edit the `username`, `password`, `bookmark_filename`, and `tag`
variables.
Requirements:
@lockcp
lockcp / gist:c9bf417946d1015b3652fd5500f448f8
Created July 6, 2021 06:35 — forked from beh/gist:3549933
Add bookmark to pinbord.in with predefined tag, without user intervention
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?later=yes&noui=yes&jump=close&tags=TAGS GO HERE&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=100,height=100'));
// Copy and paste the above into a new bookmark. Replace "TAGS GO HERE" with your tags. Presto!
@lockcp
lockcp / readinglist_pinboard.py
Created July 17, 2021 18:27 — forked from samuelkordik/readinglist_pinboard.py
Sync Safari Reading List bookmarks to Pinboard
#!/Users/samuelkordik/.pyenv/shims/python
# ReadingListCatcher
# - A script for exporting Safari Reading List items to Markdown and Pinboard
# Originally by Brett Terpstra 2015, <https://brettterpstra.com/2015/01/06/reading-list-catcher/>
# Modifications by Zach Fine made in 2020 to use the original reading list item in the
# posts to pinboard.
# Updated 2021-06-21 by Samuel Kordik to fix errors due to deprecated API in plistlib,
# changes to Pinboard api and Pinboard python lib; added enhanced logging output
# and error handling to work as a cron job or shell script.
# Uses code from <https://gist.github.com/robmathers/5995026>
@lockcp
lockcp / obsidian-web-clipper.js
Created August 11, 2021 17:00 — forked from kepano/obsidian-web-clipper.js
Obsidian Bookmarklet to clip pages
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@lockcp
lockcp / Pinboard.scpt
Created August 25, 2021 19:27 — forked from itst/Pinboard.scpt
Import and update your Pinboard bookmarks to DEVONthink
(* Import and update your Pinboard bookmarks to DEVONthink
Based on work done by Christian Grunenberg on Mon Jan 23 2006,
Rafael Bugajewski to support Pinboard instead of Delicious on Sun Dec 19 2010 and
Andreas Zeitler on Sun Mar 03 2011 to display user feedback when finished.
By Sascha A. Carlin <https://sascha.carlin.de/> on 2018-03-07 to set the creation date of new record, show progress bar, use Pinboard Auth Token, use modification date of folder to fetch only recent items
Copyright (c) 2018. All rights reserved. *)
use framework "Foundation"
@lockcp
lockcp / SteamFreeGamesFetcher.js
Created September 16, 2021 15:55 — forked from huiyadanli/SteamFreeGamesFetcher.js
Steam 免费游戏一键领取
/**
* Steam 免费游戏一键领取
* ------------------------
* 1.打开 https://store.steampowered.com/account/licenses/
* 2.登录网页steam账号
* 3.F12执行以下代码
*/
(function()
{
if( location.href.match( /^https:\/\/store\.steampowered\.com\/account\/licenses\/?$/ ) === null )
@lockcp
lockcp / workflowy-with-image.js
Created December 11, 2021 17:09 — forked from Wizmann/workflowy-with-image.js
workflowy-with-image.js
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://workflowy.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
@lockcp
lockcp / README.md
Created January 15, 2022 17:34 — forked from shodty/README.md
Create a Toggle button for the right sidebar in Roam.

Move the right sidebar toggle to a button in the upper right icon tray.

Demo

You can add this to Roam using {{[[roam/js]]}}

Grab the code in roam-sidebar-toggle.js and drop it in a javascript code block, nested underneath a {{[[roam/js]]}} block:

  ```javascript```
;(function () {
// Don't show navigation controls on mobile
var initialize_back_forward_buttons = () => {
// Don't show navigation controls on mobile
if(/Android|iPhone/i.test(navigator.userAgent)){
return;
}
if(window.initialized_back_forward_buttons) {