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
""" | |
Ref: https://community.sourcegraph.com/t/create-custom-prompt-programmatically/2189/3?u=olejorgenb | |
Likely this only works for Enterprise, but migh be possible to adjust for Pro if the web-interface is available. | |
""" | |
import base64 | |
import json | |
import sys | |
import urllib |
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: NRK TV: Set URL to current time | |
// bookmarklet_about: Change the browser URL to reference to the current time. Useful to bookmark or share a video position. (shame on NRK for not exposing the better) | |
// https://gist.github.com/olejorgenb/483d632e81d818abbd61615b9823c5be | |
function main() { | |
const videoElements = document.getElementsByTagName("video") | |
if (videoElements.length !== 1) { | |
alert("More than one video element in page") | |
return | |
} |
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 comments only | |
// bookmarklet_about: Toggle between comments only and all activity on GitLab issues/MRs | |
// Source: https://gist.github.com/olejorgenb/5ee29179838a9c663a4d96b1118f283f | |
// LIB | |
// SCRIPT | |
function main() { | |
function commentOnly() { |
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, [email protected] | |
Lookup elevation in Norway (NB: might need to change dataset for northern Norway) | |
Dependencies: | |
- owslib | |
- rasterio | |
""" |
NewerOlder