#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 = [email protected] | |
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 |
#!/bin/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
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 = ...;" |