A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font" > | |
<edit mode="assign" name="rgba" > | |
<const>none</const> | |
</edit> | |
</match> | |
<match target="font" > | |
<edit mode="assign" name="hinting" > |
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
# POST a JSON file and redirect output to stdout | |
wget -q -O - --header="Content-Type:application/json" --post-file=foo.json http://127.0.0.1 | |
# Download a complete website | |
wget -m -r -linf -k -p -q -E -e robots=off http://127.0.0.1 | |
# But it may be sufficient | |
wget -mpk http://127.0.0.1 | |
# Download all images of a website |
tvheadend dbus-1/ root~# cat /usr/local/etc/dbus-1/system.d/avahi-dbus.conf | |
<!DOCTYPE busconfig PUBLIC | |
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | |
<busconfig> | |
<!-- Only root or user avahi can own the Avahi service --> | |
<policy user="avahi"> | |
<allow own="org.freedesktop.Avahi"/> | |
</policy> |
#!/bin/bash | |
# rluks.sh: Mount your encrypted LUKS drives by uuid over SSH | |
# Copyright (C) 2016+ James Shubin, AGPLv3+ | |
# Written by James Shubin <[email protected]> | |
# You probably want to modify the following globals to match your needs... | |
SERVER='server.example.com' # expected server for running script | |
HOSTNAME='myserver' # expected hostname for running locally | |
MEDIA='/media/' # mount/media directory, eg: /media/ | |
declare -A MAP # create an associative array |
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Copyright (c) 2008 Doug Hellmann All rights reserved. | |
# | |
""" | |
""" | |
__version__ = "$Id$" | |
#end_pymotw_header |
[alias] | |
co = checkout | |
cob = checkout -b | |
coo = !git fetch && git checkout | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
merged = branch --merged | |
st = status | |
aa = add -A . |
""" | |
Extend createsuperuser command to allow non-interactive creation of a | |
superuser with a password. | |
Instructions: | |
mkdir -p path-to-your-app/management/commands/ | |
touch path-to-your-app/management/__init__.py | |
touch path-to-your-app/management/commands/__init__.py |
import hashlib, base64, hmac | |
def get_proxy_signature(query_dict, secret): | |
""" | |
Calculate the signature of the given query dict as per Shopify's documentation for proxy requests. | |
See: http://docs.shopify.com/api/tutorials/application-proxies#security | |
""" | |
# Sort and combine query parameters into a single string. |