A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);
# do it once | |
seq 1 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# do it twice | |
seq 2 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# do it 4 times, but at 2 a time | |
seq 4 | parallel -n0 -j2 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# you can also put all your commands into a file |
This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.
npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
#!/bin/sh | |
# SPDX-FileCopyrightText: 2017-2022 SanderTheDragon <sanderthedragon@zoho.com> | |
# | |
# SPDX-License-Identifier: MIT | |
curlExists=$(command -v curl) | |
echo "Testing Postman version" |
addEventListener('fetch', event => { | |
event.respondWith(purgeCache(event.request)) | |
}) | |
async function purgeCache(request) { | |
const url = new URL(request.url) |
<!-- Goes into viewer.html just before ending </body> --> | |
<script> | |
let pinchZoomEnabled = false; | |
function enablePinchZoom(pdfViewer) { | |
let startX = 0, startY = 0; | |
let initialPinchDistance = 0; | |
let pinchScale = 1; | |
const viewer = document.getElementById("viewer"); | |
const container = document.getElementById("viewerContainer"); | |
const reset = () => { startX = startY = initialPinchDistance = 0; pinchScale = 1; }; |
#!/bin/bash | |
# copymysql.sh | |
# GENERATED WITH USING ARTUR BODERA'S SCRIPT | |
# Source script at: https://gist.github.com/2215200 | |
MYSQLDUMP="/usr/bin/mysqldump" | |
MYSQL="/usr/bin/mysql" |
[ | |
{ | |
"label": "GEOSINTsearch", | |
"tooltip": "Searches within posts from Twitter, Reddit and 4Chan and presents anything that contains a Google Maps link", | |
"value": "https://cse.google.com/cse?cx=015328649639895072395:sbv3zyxzmji" | |
}, | |
{ | |
"label": "Pasted tekst", | |
"tooltip": "Look if any specifc text has been posted before", | |
"value": "https://cse.google.com/cse/publicurl?cx=013991603413798772546:nxs552dhq8k" |
#!/usr/bin/env bash | |
# Installs ffmpeg from source (HEAD) with libaom and libx265, as well as a few | |
# other common libraries | |
# binary will be at ~/bin/ffmpeg | |
sudo apt update && sudo apt upgrade -y | |
mkdir -p ~/ffmpeg_sources ~/bin | |
export PATH="$HOME/bin:$PATH" |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
async function fetchAndApply(request) { | |
let response = await fetch(request) | |
let referer = request.headers.get('Referer') | |
let contentType = response.headers.get('Content-Type') || '' | |
if (referer && contentType.startsWith('image/')) { |