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 bash | |
set -e | |
set -o errexit | |
docker stop `docker ps -qa` > /dev/null 2>&1; ## Stop all running containers | |
docker buildx stop; ## Stop the buildx builder | |
docker system prune --all --force --volumes; ## Remove all volumes, images, and containers | |
docker buildx rm --all-inactive --force; ## Remove all buildx builders | |
docker buildx prune --all --force; ## Prune buildx builder caches |
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
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/" */ |
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
/** | |
* @description: Handler entry point. | |
* - Note AWS CloudFront Functions use a modified ECMAScript 5.1 compatible runtime and NOT NodeJS. | |
* - Use var, not const or let | |
* - Use string concatenation and not template literals | |
* - Beware that the CloudFront Functions Console editor and test environment do NOT mimic CloudFront 100% | |
* @date 2022-01-26 | |
* @param {object} event: A CloudFront Function event (expecting a Viewer Request event) | |
* @return {object}: A CloudFront response or request object (depends whether conditions allow pass through or 301 redirect) | |
*/ |
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 | |
# Stop all containers | |
docker stop $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
# SYNTAX: | |
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches) | |
var pattern = /pattern/attributes; # same as above | |
# BRACKETS: | |
[...]: Any one character between the brackets. | |
[^...]: Any one character not between the brackets. |
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
#InstallKeybdHook | |
; Language: English | |
; https://gist.github.com/chrisfcarroll/dddf32fea1f29e75f564 | |
; | |
; Uses unicode. Save this file as utf-8 with BOM. | |
; Else it shall not work. | |
; | |
#NoEnv ; Recommended | |
;SendMode Input ; Recommended |
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
/* iPhone 6 landscape */ | |
@media only screen and (min-device-width: 375px) | |
and (max-device-width: 667px) | |
and (orientation: landscape) | |
and (-webkit-min-device-pixel-ratio: 2) | |
{ } | |
/* iPhone 6 portrait */ | |
@media only screen | |
and (min-device-width: 375px) |
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
@mixin pointer($background, $borderwidth, $bordercolor, $arrowsize, $arrowposition) { | |
background: $background; | |
border: $borderwidth solid $bordercolor; | |
&:after, &:before { | |
@if $arrowposition == 'top' { | |
bottom: 100%; | |
left: 50%; | |
} | |
@if $arrowposition == 'bottom' { | |
top: 100%; |