Skip to content

Instantly share code, notes, and snippets.

@loilo
loilo / redirect-to-english.js
Last active October 12, 2023 21:23
Userscript: Redirect Website to its English Version
// This userscript redirects you to the English version of a website if it's denoted in the source code.
// Insert any URLs of websites below (after @match), for example https://developer.mozilla.org/* or https://www.php.net/*
// Use multiple @match clauses to enable the script on several domains.
// ==UserScript==
// @name Redirect to English
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Redirect websites to their English version
// @author Florian Reuschel <florian@loilo.de>
@mikroskeem
mikroskeem / andromeda.sh
Created May 19, 2018 18:15
Get substratum's andromeda running without PC on Termux & Arch Linux proot
#!/bin/bash
ANDROMEDA_BASE="$(adb shell pm path projekt.andromeda | cut -d : -f 2 | sed s/\\r//g)"
ANDROMOEDA_PID="$(adb shell pidof andromeda)"
if [ -z "${ANDROMEDA_BASE}" ]; then
echo "Could not find projekt.andromeda apk path"
exit 1
fi
@MichaelPolla
MichaelPolla / github-resize-pictures.md
Last active May 22, 2024 19:00
Markdown - Resize pictures in GitHub, including in comments comment

Markdown - Resize pictures in GitHub

I found that the "best" way is to use HTML, as it works both in Readme/.md files and also in comments (within Issues, Gist...)

E.g. when adding/editing a comment (within Issues, Gist...) :

  • Upload the picture by drag-and-drop in the text field
  • replace ![image](https://your-image-url.type) with <img src="https://your-image-url.type" width="100" height="100">

As mentioned by @cbestow (thanks!), it's not mandatory to set both width and height. If only one is set, the other will be adjusted accordingly to preserve the aspect ratio of the image.