If ntpdate
is installed:
sudo ntpdate pool.ntp.org
To install ntpdate
:
sudo apt-get install ntpdate # for Ubuntu-like
Preferences for Auto Text Expander ℹ️👍😃 |
If ntpdate
is installed:
sudo ntpdate pool.ntp.org
To install ntpdate
:
sudo apt-get install ntpdate # for Ubuntu-like
r"""Command-line tool to validate and pretty-print JSON | |
Usage:: | |
$ echo '{"json":"obj"}' | python -m json.tool | |
{ | |
"json": "obj" | |
} | |
$ echo '{ 1.2:3.4}' | python -m json.tool | |
Expecting property name enclosed in double quotes: line 1 column 3 (char 2) |
# coding: utf-8 | |
# Barcode scanner demo for Pythonista | |
# Based on http://www.infragistics.com/community/blogs/torrey-betts/archive/2013/10/10/scanning-barcodes-with-ios-7-objective-c.aspx | |
from objc_util import * | |
from ctypes import c_void_p | |
import ui | |
import sound | |
found_codes = set() |
A JSON file of GitHub's emojicodes and emoji. Unlike other projects, | |
this one includes the actual emoji and does not alter GitHub's list. | |
Also included is a JSON file formatted for use with the Auto Text | |
Expander extension for Google Chrome, with text to be expanded based | |
on GitHub's ":EMOJICODE:". | |
See README.md for details. | |
#!/bin/sh -- | |
## | |
## Requires your VPN service to be already configured | |
## and your password saved in your keychain. | |
## | |
## Alter the VPN variable below to contain the name | |
## of your configured VPN service before running. | |
## |
class Iso8601UTCTimeFormatter(logging.Formatter): | |
""" | |
A logging Formatter class giving timestamps in a more common ISO 8601 format. | |
The default logging.Formatter class **claims** to give timestamps in ISO 8601 format | |
if it is not initialized with a different timestamp format string. However, its | |
format, "YYYY-MM-DD hh:mm:ss,sss", is much less common than, "YYYY-MM-DDThh:mm:ss.sss". | |
That is, the separator between date and time is a space instead of the letter "T" | |
and the separator for fractional seconds is a comma instead of a period (full stop). | |
While these differences may not be strictly *wrong*, it makes the formatted timestamp |
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); | |
body { | |
background-color: white; | |
font-family: 'Open Sans', sans-serif; | |
} | |
#content { | |
width: 700px; | |
margin-top: 50px; |
def stringContainsAnyCharacters(string, characters): | |
""" | |
Check whether 'string' contains any characters from string 'characters'. | |
:param string: String to check for wanted characters | |
:type string: str | |
:param characters: String of characters to be found | |
:type characters: str | |
:return: True if any characters are found, False otherwise | |
:rtype: bool |