Blog post: https://segmentfault.com/a/1190000017136059
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
import sqlite3 | |
import json | |
import shutil | |
import os | |
tags = [] | |
joins = [] | |
# Tested with Notally v5.2 and QuillPad v1.4.9 | |
# will not preserve note color |
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
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432 | |
# Password: | |
# psql (9.1.10, server 0.0.0) | |
# WARNING: psql version 9.1, server version 0.0. | |
# Some psql features might not work. | |
# Type "help" for help. | |
# | |
# th30z=> select foo; | |
# a | b | |
# ---+--- |
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
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432 | |
# Password: | |
# psql (9.1.10, server 0.0.0) | |
# WARNING: psql version 9.1, server version 0.0. | |
# Some psql features might not work. | |
# Type "help" for help. | |
# | |
# th30z=> select foo; | |
# a | b | |
# ---+--- |
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
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432 | |
# Password: | |
# psql (9.1.10, server 0.0.0) | |
# WARNING: psql version 9.1, server version 0.0. | |
# Some psql features might not work. | |
# Type "help" for help. | |
# | |
# th30z=> select foo; | |
# a | b | |
# ---+--- |
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
import os | |
from base64 import b64decode, b64encode | |
from cryptography.hazmat.primitives import hashes | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC | |
from cryptography.hazmat.backends import default_backend | |
_BACKEND = default_backend() |
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
#!python | |
## sudo apt-get install python3-evdev | |
# Tested with `SC-8110-2D-B` 1d & 2d barcode scanner | |
# | |
# Inspired by https://github.com/julzhk/usb_barcode_scanner | |
# which was inspired by https://www.piddlerintheroot.com/barcode-scanner/ | |
# https://www.raspberrypi.org/forums/viewtopic.php?f=45&t=55100 | |
# from 'brechmos' - thank-you! | |
# |
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 python | |
"""Utility methods for Google Spreadsheets based on gspread library. | |
Used mostly for logging. | |
http://hakanu.net/2014/09/14/how-i-store-server-logs-in-google-spreadsheets/ | |
Here are the dependecies: | |
sudo apt-get install python-pip python-dev build-essential | |
sudo easy_install gspread | |
""" |
Based on https://gist.github.com/zeevro/ce20d0d74a869d73119e9d1522b7caa7 - a 64-bit downloader for Pebble SDK under Linux (or Windows WSL) - Ubuntu 18.04.2.
Picks up binaries from Rebble (AWS for some reason not from github) along with (updated) pebble tool from github.
This script downloads and installs everything needed to build projects and also run the emulator.
Tested on
- (32-bit) Lubuntu 16.04 LTS - see https://gist.github.com/clach04/445b38080b672aa61572e84525805c37
- Ubuntu 18.04.2 on WSL
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
None of the workflow examples given in the Google Authentication OAuth2 documentation | |
(https://developers.google.com/accounts/docs/OAuth2) handle what's needed for Pebble. I | |
basically had to mix the needs of a client-side application with an offline web application | |
to get what's needed and work within the restrictions of the Pebble JS toolkit. | |
The steps are as follows: | |
1. Setup a Client ID for Web Application on the Google Developer Console | |
2. On the configuration web pages, with SSL: | |
* In the configuration page, use JavaScript to retrieve a authorization code, which |
NewerOlder