This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//bookmarklet_title: UnShort | |
function unshort() { | |
const videoId = location.pathname.split("/")[2] | |
location.replace(`/watch?v=${videoId}`) | |
} | |
unshort() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bookmarklet_title: SciHub | |
function findInSciHub() { | |
const sciHubUrl = `https://sci-hub.se/${location.toString()}` | |
window.open(sciHubUrl, "_blank") | |
} | |
findInSciHub() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bookmarklet_title: Toggle meeting rooms | |
// bookmarklet_about: Toogle meeting room calendar visibility (Google Calendar) | |
function findCalendarCheckboxesOf(labelRegex) { | |
const calendarDiv = document.querySelector("[aria-label='Other calendars']") | |
let matches = [] | |
for (const li of calendarDiv.querySelectorAll("li")) { | |
if (li.innerText.match(labelRegex)) { | |
matches.push(li.querySelector("input[type=checkbox]")) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# set -x | |
# The URLs for the extension and the Git repo | |
EXTENSION_URL="https://addons.mozilla.org/firefox/downloads/file/4099496/tab_modifier-0.21.0.xpi" | |
GIT_REPO_URL="https://github.com/furybee/chrome-tab-modifier.git" | |
# The names of the extension and Git repo directories | |
EXTENSION_DIR="tab_modifier_extension" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env gjs | |
/* | |
Create a window with given size constraints | |
Run it with: | |
gjs $FILENAME | |
*/ | |
const Gio = imports.gi.Gio; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Author: Ole Jørgen Brønner, olejorgen@yahoo.no | |
Lookup elevation in Norway (NB: might need to change dataset for northern Norway) | |
Dependencies: | |
- owslib | |
- rasterio | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function applyMotionBlur(actor, n, dir, wFn=function() { return 1; }) { | |
function blurShaderSource() { | |
function SAMPLE(offx, offy, w) { | |
return `pixel += ${w} * texture2D (tex, cogl_tex_coord_in[0].st + vec2(width_inv, height_inv) * vec2 (${offx}, ${offy}));` | |
} | |
function motionBlur(n, sign=1) { | |
let vs = [] | |
let weights = [] | |
let sum = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Firefox places.sqlite exploration | |
-- https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Database | |
-- https://wiki.mozilla.org/images/d/d5/Places.sqlite.schema3.pdf | |
-- http://forensicswiki.org/wiki/Mozilla_Firefox_3_History_File_Format (probably somewhat outdated) | |
-- [select text -> right click -> search] does not set from_visit :( | |
-- Gotchas :angry-face: https://superuser.com/a/1405880/153095 (Explains why your history is incomplete) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Author: Ole Jørgen Brønner (olejorgenb@yahoo.no) | |
-- Requirement: xclip | |
-- Installation: | |
-- 'mkdir -p ~/.config/mpv/scripts && cp -i copy-permalink.lua ~/.config/mpv/scripts' | |
function copyPermalink() | |
local pos = mp.get_property_number("time-pos") | |
local uri = mp.get_property("path") | |
-- %q might not be fully robust | |
local bookmark = string.format("mpv --start=%s %q", pos, uri) |
NewerOlder