Skip to content

Instantly share code, notes, and snippets.

@kepano
kepano / obsidian-web-clipper.js
Last active May 5, 2024 23:29
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@pedrolamas
pedrolamas / docker-iptables-fix.sh
Created August 18, 2020 19:32
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 6, 2024 08:58
crack activate Office on mac with license file

Using Let's Encrypt with openHAB

You can use a FREE certificate from [Let's Encrypt] (https://letsencrypt.org/) to secure your [openHAB] (http://www.openhab.org/) installation.

This quick information page is based on detail from https://gist.github.com/jpmens/8029383.

To start, get the Let's Encrypt client as shown here https://letsencrypt.org/howitworks/. I checked it out into /root/letsencrypt.

Pick a password for your keystore. Use the commandline in step 9 of [jpmen's tutorial] (https://gist.github.com/jpmens/8029383) to create jetty passwords and update the jetty.xml.

@ljm42
ljm42 / docker-shell
Last active March 20, 2024 07:36
A script to easily "docker exec" into a running Docker container
#!/bin/bash
# easily "docker exec" into a running Docker container
# latest version: https://gist.github.com/ljm42/2b3bfd8ff886015bbce8
# for unRAID, place this script on your flash drive as /boot/custom/docker-shell
# then add this to your go script (without the leading pound sign):
# cp /boot/custom/docker-shell /usr/local/bin
CONTAINERS=`docker ps | awk 'NR==1 {offset=index($0,"NAMES")};NR>1{print substr($0,offset)}' | sort -f | tr "\n" " "`
@Thermionix
Thermionix / auth-basic.conf
Last active November 4, 2021 00:56
nginx reverse proxy for sickbeard, couchpotato etc.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;