Skip to content

Instantly share code, notes, and snippets.

@mhoye
mhoye / gist:dcc2c2febeba230ca7ceb25c970390a1
Last active April 22, 2025 22:07
uBlock Origin Bonus Content
# The list below is my current set of uBlock Origin additions.
# My criteria are basically, if I think a page is slow I look at
# the network tab in devtools, and if I see many megabytes of
# javascript shimmed in there I block the server delivering it.
# If that changes literally nothing that I see or care about, I
# add it to the list.
# This breaks (most) youtube embeds, the "log in with google"
# popup, and twitter/facebook entirely. It also presents some
# usability problems with Google sites (gdocs, etc) that I decided
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active January 9, 2025 12:22
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

// ==UserScript==
// @name GC Tour
// @namespace https://gist.github.com/DieBatzen/5814dc7368c1034470c8/
// @version 4.36
// @description Cachetour planning made easy. Pick some Caches, sort the list and print it out. Free for all users of geocaching.com!
// @author Die Batzen, madd.in
// @run-at document-end
// @match http*://www.geocaching.com/*
// @match https://www.gctour.de/map/show*
// @exclude /^https?://www\.geocaching\.com/(login|jobs|careers|promotions|blog|help)/
anonymous
anonymous / gctour.user.js
Created October 31, 2015 09:07
// ==UserScript==
// @name GC Tour
// @namespace madd.in
// @version 2.3
// @build 14271
// @description Cachetour planing made easy. Pick some Caches, sort the list and print it out. Free for all users of geocaching.com!
// @run-at document-end
// @include http*://www.geocaching.com/*
// @include http://gctour*.madd.in/map/show*#gui
// @exclude /^https?://www\.geocaching\.com/(login|about|articles)/
@james-see
james-see / squarify.py
Created April 24, 2014 05:07
Pythonista Script to Post Non-Square Images to Instagram without cropping
from PIL import Image, ImageOps
import clipboard, photos,webbrowser
im=photos.pick_image()#clipboard.get_image
if im.size[0] >= im.size[1]:
whitespace=((im.size[0]-im.size[1])/2)+250
xbump=250
else:
xbump=((im.size[1]-im.size[0])/2)+250
whitespace=250
matted=ImageOps.expand(im,border=(xbump,whitespace),fill='white')