Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
| #!/bin/bash | |
| # | |
| # Watch current directory (recursively) for file changes, and execute | |
| # a command when a file or directory is created, modified or deleted. | |
| # | |
| # Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
| # | |
| # Requires Linux, bash and inotifywait (from inotify-tools package). | |
| # | |
| # To avoid executing the command multiple times when a sequence of |
| import json | |
| import tornado.web | |
| class JsonHandler(BaseHandler): | |
| """Request handler where requests and responses speak JSON.""" | |
| def prepare(self): | |
| # Incorporate request JSON into arguments dictionary. | |
| if self.request.body: | |
| try: |
| def root= new File('/usr/share') | |
| def full= new File('/usr/share/docs/rpm-4.4') | |
| // Print the relative path of 'full' in relation to 'root' | |
| // Notice that the full path is passed as a parameter to the root. | |
| def relPath= new File( root.toURI().relativize( full.toURI() ).toString() ) |
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS:
| #!/bin/bash | |
| # This script is used by Nagios to post alerts into a Slack channel | |
| # using the Incoming WebHooks integration. Create the channel, botname | |
| # and integration first and then add this notification script in your | |
| # Nagios configuration. | |
| # | |
| # All variables that start with NAGIOS_ are provided by Nagios as | |
| # environment variables when an notification is generated. | |
| # A list of the env variables is available here: |
| # -*- coding: utf-8 -*- | |
| import requests | |
| from io import BytesIO, SEEK_SET, SEEK_END | |
| class ResponseStream(object): | |
| def __init__(self, request_iterator): | |
| self._bytes = BytesIO() | |
| self._iterator = request_iterator |
[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.