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
http://strftime.org/ | |
Code Meaning Example | |
%a Weekday as locale’s abbreviated name. Mon | |
%A Weekday as locale’s full name. Monday | |
%w Weekday as a decimal number, where 0 is Sunday and 6 is Saturday. 1 | |
%d Day of the month as a zero-padded decimal number. 30 | |
%-d Day of the month as a decimal number. (Platform specific) 30 | |
%b Month as locale’s abbreviated name. Sep | |
%B Month as locale’s full name. September |
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
class ColorPrinter: | |
""" | |
Usage: | |
cprint = ColorPrinter() | |
cprint.cfg('c','m','bux').out('Hello','World!') | |
cprint.rst().out('Bye now...') | |
See: http://stackoverflow.com/a/21786287/472610 | |
See: https://en.wikipedia.org/wiki/ANSI_escape_code | |
""" |
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
JSON.stringify(msg,null,'\t') // pretty print |
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
const tabToPromise = tab => { | |
let _then = favUrl => Promise.resolve(Object.defineProperty(tab,'favicon',{value:favUrl})); | |
return tab.favicon.then(_then,_then); | |
} | |
tabToPromise(tabData).then(bookmark => | |
Request({ | |
url: DBURL, | |
content: JSON.stringify(bookmark), | |
contentType: "application/json", |