#Notes this is a fork from GMK87 adapted to gmk87, if you notice something wrong or add any other feature, just ping me here on github.
English manual for the ZUOYA GMK87 Mechanical Keyboard. Made from the printed version (Original).
#Notes this is a fork from GMK87 adapted to gmk87, if you notice something wrong or add any other feature, just ping me here on github.
English manual for the ZUOYA GMK87 Mechanical Keyboard. Made from the printed version (Original).
// From https://github.com/WebBluetoothCG/demos/blob/gh-pages/bluetooth-printer/index.html | |
var SERVICE = '000018f0-0000-1000-8000-00805f9b34fb'; | |
var WRITE = '00002af1-0000-1000-8000-00805f9b34fb'; | |
var DATA = '' | |
+ '\x1B' + '\x61' + '\x31' // center align | |
+ '\x1D' + '\x21' + '\x11' + 'Hello\nBluetooth!\n\n' // double font size | |
+ '\x1D' + '\x21' + '\x00' + '... from your friends\nat https://qz.io' // normal font size | |
+ '\n\n\n\n\n\n\n'; // feed paper |
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
[metadata] | |
name = {name} | |
version = file: {name}/_version.txt | |
author = Martin Larralde | |
author_email = martin.larralde@embl.de | |
url = https://github.com/althonos/{name} | |
description = {description} | |
long_description = file: README.md |
:80 | |
root /usr/src/wordpress | |
gzip | |
fastcgi / wordpress:9000 php | |
rewrite { | |
if {path} not_match ^\/wp-admin | |
to {path} {path}/ /index.php?_url={uri} | |
} | |
log stdout | |
errors stderr |
#!/usr/bin/env bash | |
# Ubuntu Server or VM Cleaner. Safe by default; aggressive when asked. | |
# Example safe: sudo ./clean.sh | |
# Example aggressive: sudo JOURNAL_DAYS=3 AGGRESSIVE=1 ./clean.sh | |
# Enable Docker image prune (images only): sudo ./clean.sh --docker-images | |
# Tested on Ubuntu 20.04, 22.04, 24.04 (server/VM images). | |
set -Eeuo pipefail | |
trap 'rc=$?; echo "Error on line $LINENO: $BASH_COMMAND (exit $rc)"; exit $rc' ERR | |
IFS=$'\n\t' |
def update(dl_url, force_update=False): | |
""" | |
Attempts to download the update url in order to find if an update is needed. | |
If an update is needed, the current script is backed up and the update is | |
saved in its place. | |
""" | |
import urllib | |
import re | |
from subprocess import call | |
def compare_versions(vA, vB): |
import getpass | |
import hashlib | |
import random | |
import string | |
password = getpass.getpass('password (not echoed): ') | |
salt = ''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase + string.digits) for x in range(32)) | |
password_hash = hashlib.md5(password + salt).hexdigest() | |
print "update CHANGEME_users set password='" + password_hash + ':' + salt + "' where id = ...;" |