Skip to content

Instantly share code, notes, and snippets.

@gruber
gruber / make_bookmarklet.pl
Last active May 5, 2024 21:11
JavaScript Bookmarklet Builder
#!/usr/bin/env perl
#
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder
use strict;
use warnings;
use URI::Escape qw(uri_escape_utf8);
use open IO => ":utf8", # UTF8 by default
":std"; # Apply to STDIN/STDOUT/STDERR
@kbauer
kbauer / myjs-compile-bookmarklet.el
Last active May 5, 2024 21:11
Emacs-lisp command for compiling a javascript file into a bookmarklet, by stripping unnecessary characters and adding a wrapper.
;;; myjs-compile-bookmarklet.el --- strip javascript code as bookmarklet -*- lexical-binding: t; coding: utf-8; lisp-indent-offset: nil; -*-
;; Copyright (C) 2018 Klaus-Dieter Bauer
;; Author: Klaus-Dieter Bauer <kdb.devel@gmail.com>
;; Keywords: javascript, bookmarklet
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
/*global sforce:true */
(function() {
function loadScript(url, callback) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
if (callback) {
script.onload = callback;
script.onreadystatechange = function() {
javascript: (function() {
var users = new Set();
var authors = {};
/* Stores all the authors that need labels and all the unique users so each user is only requested once. */
$(".author").each(function() {
if (!$(this).parent().find(".bookmarklet-container").length) {
var user = $(this).text();
if (authors[user] == null) {
authors[user] = [];
(function() {
var borderRadius, closeBookmarklet, closeButton, css, cssBody, iframe, inProgressBanner, inProgressBannerText, receiveMessage, shadow, targetUrl, title, url,
_this = this;
if (window.location.host === "www.potluck.it" || window.nestBookmarkletShown) {
return;
} else {
window.nestBookmarkletShown = true;
}
//bookmarklet-title: Canvas DL
//bookmarklet-about: When playing skribbl.io and someone has made a nice drawing, this lets you download the current drawing as a PNG.
var w = window.wdq || (window.wdq = document.createElement("a"));
var p = /The word was '([^']*)'/g,
pp = /<span>([^<>]+) is drawing now!/g,
tt = document.body.innerHTML;
var mm, nn, xx;
while (mm = p.exec(tt)) nn = mm;
while (mm = pp.exec(tt)) xx = mm;
@rxctionzz
rxctionzz / bookmarklets.markdown
Created February 24, 2023 21:47
Bookmarklets

Bookmarklets

A useful resource for all the people looking for bookmarklets for their favourite services.

Additions are welcome. Just comment with the name of the service and a link to the bookmarklets.

A Pen by ArRolin on CodePen.

License.

@Klerith
Klerith / configurar-node-ts.md
Last active May 5, 2024 21:08
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
@jonjaques
jonjaques / bookmarklet.js
Last active May 5, 2024 21:07
jQuery Bookmarklet Template w/ Async Loading
// You create your bookmarklet by instantiating
// a new Bookmarklet function, then pass in the options like so.
// This example checks to see if the var is already defined, and makes
// sure not to overwrite it. This could happen if the user clicks on
// the bookmarklet more than once.
MyBookmarklet = MyBookmarklet || (MyBookmarklet = new Bookmarklet({
// debug: true, // use debug to bust the cache on your resources
css: ['/my/style.css'],
js: [],
@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active May 5, 2024 21:06
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#