This file contains hidden or 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
# src: https://git.io/J3aWK | |
# doc: https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/ | |
# example: https://www.nginx.com/resources/wiki/start/topics/examples/full/#nginx-conf | |
# example: https://gist.github.com/terrywang/9612069 | |
user user staff; ## Default: nobody | |
worker_processes auto; ## Default: 1 | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; |
This file contains hidden or 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 python3 | |
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab: | |
import os | |
import sys | |
import requests | |
docs = { | |
'68000': { | |
'M68000PRM.pdf': 'https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf', |
This file contains hidden or 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
# put me in: /etc/systemd/system/ | |
# ngrok binary: https://ngrok.com/download | |
# sudo chmod +x /opt/ngrok/ngrok | |
[Unit] | |
Description=ngrok | |
After=network.target | |
[Service] | |
ExecStart=/opt/ngrok/ngrok start --all --config /opt/ngrok/ngrok.yml | |
ExecReload=/bin/kill -HUP $MAINPID |
This file contains hidden or 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 | |
# src: https://gist.github.com/apfelchips/001b4ffb22c0578220595623f5546107 | |
# mkdir -p "$HOME/bin" && curl -L "https://git.io/JKGha" -o "$HOME/bin/url-open.sh" && chmod +x "$HOME/bin/url-open.sh" && url-open.sh | |
install_desktop_file(){ | |
# MimeSpec: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/data/freedesktop.org.xml.in | |
# Desktop Entry Spec: https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html | |
echo "creating .desktop entry" |
This file contains hidden or 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
--- | |
# Original idea found at http://stackoverflow.com/a/39083724 | |
# | |
# ansible -i inventory.ini add-ssh-keys.yml | |
# | |
- name: Store known hosts of 'all' the hosts in the inventory file | |
hosts: localhost | |
connection: local | |
vars: | |
ssh_known_hosts_command: "ssh-keyscan -T 10" |
This file contains hidden or 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 -euo pipefail | |
IFS=$'\n\t' | |
SCRIPT_DIR=$(realpath -- $(dirname -- $0)) | |
SCRIPT_NAME=$(basename "$0") | |
#SCRIPT_TMP=$(mktemp -d "${TMPDIR:-/tmp}/${SCRIPT_NAME}_XXXXXXX") | |
SCRIPT_VERSION='0.0.1' | |
VERBOSITY=0 | |
TARGET_USER= |
This file contains hidden or 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 python3 | |
""" | |
inspiration: | |
https://gist.github.com/phrawzty/62540f146ee5e74ea1ab?permalink_comment_id=2358615 | |
https://gist.github.com/nitaku/10d0662536f37a087e1b#file-server-py | |
example: | |
curl -s -H "X-Something: yeah" localhost:8080 | |
curl --data "{\"this\":\"is a test\"}" localhost:8080 |
This file contains hidden or 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
// ==UserScript== | |
// @name aliexpress_en | |
// @version 0.2 | |
// @description always redirect to aliexpress.com and reset the location/language/currency settings. This script pins locale settings cookie. Please clear cookies on all "aliexpress" domains before using this userscript. | |
// @author @[email protected] | |
// @match *://www.aliexpress.com/* | |
// @match *://*.aliexpress.com/* | |
// @match *://www.aliexpress.ru/* | |
// @match *://*.aliexpress.ru/* | |
// @noframes |
This file contains hidden or 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
# docs: https://github.com/fsquillace/junest#installation | |
# git clone https://github.com/fsquillace/junest.git ~/.local/share/junest | |
if [ $BASH_VERSION ] && [ $JUNEST_ENV ]; then | |
export debian_chroot="junest" | |
fi | |
if [ ! $JUNEST_ENV ] && [ -d "$HOME/.local/share/junest/bin" ]; then | |
export PATH="$HOME/.local/share/junest/bin:$PATH" | |
fi |
This file contains hidden or 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 python3 | |
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.pem with the following command: | |
# openssl req -new -x509 -keyout key.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:8443 | |
import http.server |