Skip to content

Instantly share code, notes, and snippets.

@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active November 15, 2024 05:14
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@adulau
adulau / hashlookup-circl-lu.md
Last active September 3, 2024 17:03
hashlookup.circl.lu - examples

hashlookup.circl.lu

CIRCL hash lookup is a public API to lookup hash values against known database of files. NSRL RDS database is included. More database will be included in the future. The API is accessible via HTTP ReST API and the API is also described as an OpenAPI.

Get information about the hash lookup database (via ReST)

curl -X 'GET' \
  'https://hashlookup.circl.lu/info' \
 -H 'accept: application/json'
@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@olets
olets / zsh-plugin-manager-plugin-installation-procedures.md
Last active November 12, 2024 20:52
zsh plugin manager cross-reference

Instructions for installing zsh plugins, for a variety of plugin managers

  • Antibody: Add <owner>/<repo> to your plugins file. If you use static loading, run the update command.

  • Antidote:

    ⚠️ Deprecated. Official recommendation is to use Antibody instead

    Add <owner>/<repo> to your plugins file. If you use static loading, run the update command.

##
# This is an adoption from Oh My Zsh for Google Cloud Shell
##
main() {
# Install zsh
sudo apt-get -qq update
sudo apt-get -qq install zsh -y
@dsculptor
dsculptor / transmit-iterm-patch.applescript
Last active September 1, 2021 08:33 — forked from johnfmorton/TransmitOpenTerminal.txt
Use Transmit 5 to open in iTerm (instead of Terminal.app). Ref: https://library.panic.com/transmit5/open-in-terminal/
-- Run the following cmd to make Transmit marry iterm2 as its Terminal partner:
-- defaults write com.panic.Transmit OpenTerminalScriptPath ~/transmit-iterm-patch.applescript
on openTerminal(location, remoteHost, serverPort)
-- Prepare sshCmd and cmd:
set sshCmd to ""
set cmd to "cd \"" & location & "\""
if ((count of remoteHost) is greater than 0) then
set sshCmd to "ssh " & remoteHost
@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active October 27, 2024 08:23
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@LucasLarson
LucasLarson / ShowAnchors.js
Last active December 2, 2022 15:16 — forked from inkarkat/ShowAnchors.js
Improved “Show Anchors” bookmarklet from Ingo Karkat’s https://gist.github.com/inkarkat/cd1d40996a1f818dfc71, which is an improvement on the bookmarklet here: http://sensefulsolutions.com/2009/12/show-anchors-bookmarklet.html
javascript:(function(){function%20a(n,t){return'<a%20href="'+loc+"#"+n+'"%20title="'+t+":%20"+n+'"%20style="text-decoration:none;padding:.2em;background:#fff;border:1px%20solid%20black;display:block;position:absolute;z-index:2147483647;border-radius:3px;-webkit-box-shadow:0%203px%207px%20rgba(0,0,0,0.3);box-shadow:0%203px%207px%20rgba(0,0,0,0.3)">#'+n+"</a>"}var%20$,loc=location.href,anchorPos=location.href.lastIndexOf("#");anchorPos>-1&&(loc=loc.substring(0,anchorPos)),function(u,c){var%20h=document.getElementsByTagName("head")[0],s=document.createElement("script");s.src=u;var%20d=!1;s.onload=s.onreadystatechange=function(){d||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(d=!0,c(),s.onload=s.onreadystatechange=null,h.removeChild(s))},h.appendChild(s)}("//code.jquery.com/jquery-3.3.1.min.js",function(){$=jQuery,$("a[name]").each(function(i){$(a(this.name,"name")).insertBefore(this)}),$("[id]:not(input[type='hidden'])").each(function(i){switch(this.nodeName){case"TD":$(this).prepend
@LucasLarson
LucasLarson / asciify-hexify.js
Last active April 16, 2019 02:13
ASCIIfy–Hexify: A bookmarklet to find a character’s ASCII and hexadecimal value
/**
* ASCIIfy–Hexify bookmarklet
* v.92
*
* Authors: Lucas Larson, 2017
* Steve Kangas, 1998
*
* Description: This is the JavaScript behind a bookmarklet to obtain the
* ASCII₁₀ value and hexadecimal value of any single character.
*
@vdsabev
vdsabev / download.js
Last active June 30, 2023 02:14
Bookmarklet - download all links on a page
javascript:(() => {
const items = document.querySelectorAll('a');
let delay = 0;
for (let index = 0; index < items.length; index++) {
const item = items[index];
item.setAttribute('download', item.getAttribute('href'));
setTimeout(() => item.click(), delay);
delay += 500;
}
})();