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
There is no API available for Kounta. Well, Kounta says there is one if you ask; I've asked a few times and was ignored. | |
This is a webscraping solution to mass exporting of daily takings reports into Saasu. |
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
smtp mail sending in cPython blocks the GIL. | |
This code is tested on python 2.7.8 and I'm using it with web2py | |
If you use Google Apps for your domain email and if you have admin access, you can easily use the gmail api. | |
Because you have admin access, you can create a "service account" in the Google Developer Console. | |
This makes authentication easy. | |
There are other authorisation methods when you don't have admin access, but they require interaction from the user via a browser. | |
To use this, you need to install these modules (From PyPI): | |
pyOpenSSL |
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
__author__ = 'tim' | |
import requests.auth | |
import binascii | |
import hashlib | |
import hmac | |
import prefs | |
import json | |
# tested only with python 3.4 |
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
# python 2.7 | |
# ********************************************************************************************************* | |
# | |
# | |
# | |
# Please see https://gist.github.com/timrichardson/e6ee6640a8b7fe664f3a5a80406ca980 | |
# | |
# for a modern way of doing this, using the current API and python 3 | |
# |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
from string import Template | |
import time | |
import pytest | |
from google.oauth2 import service_account | |
from googleapiclient.discovery import build | |
from googleapiclient.errors import * | |
from google.auth.exceptions import * | |
import easygui | |
import pandas as pd |
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
--- TLP 1.2.2 -------------------------------------------- | |
+++ Configured Settings: /etc/default/tlp | |
TLP_ENABLE=1 | |
TLP_DEFAULT_MODE=AC | |
TLP_PERSISTENT_DEFAULT=0 | |
DISK_IDLE_SECS_ON_AC=0 | |
DISK_IDLE_SECS_ON_BAT=2 | |
MAX_LOST_WORK_SECS_ON_AC=15 | |
MAX_LOST_WORK_SECS_ON_BAT=60 |
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
https://wiki.ubuntu.com/KernelTeam/GitKernelBuild | |
to return to the repo files, | |
git clean -fdx |
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
# ansible-playbook -i inventory -v yourplaybook.yml | |
# you need to add community.general to the local machine's ansible setup | |
# https://docs.ansible.com/ansible/latest/collections/community/general/ | |
# ansible needs to be 2.9.10 or later | |
--- | |
- name: Snippets regarding postgres key parameter configuration | |
hosts: all |
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 this in ~/.config/fontconfig (~ means in your home directory) | |
# this is relvevant if if you copied Calibri from a Windows fonts directory into your Linux install | |
# this way you get the latest version of Windows fonts, but the bitmapping for Calibri is not really designed to be used | |
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font"> | |
<test qual="all" name="family" compare="contains"> |
OlderNewer