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: |
[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]
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.
import sys | |
def j(lineno): | |
frame = sys._getframe().f_back | |
called_from = frame | |
def hook(frame, event, arg): | |
if event == 'line' and frame == called_from: | |
try: | |
frame.f_lineno = lineno |