A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
# Based on post from: https://snipt.net/chrisdpratt/symmetrical-manytomany-filter-horizontal-in-django-admin/#L-26 | |
# Only reposting to avoid loosing it. | |
""" | |
When adding a many-to-many (m2m) relationship in Django, you can use a nice filter-style multiple select widget to manage entries. However, Django only lets you edit the m2m relationship this way on the forward model. The only built-in method in Django to edit the reverse relationship in the admin is through an InlineModelAdmin. | |
Below is an example of how to create a filtered multiple select for the reverse relationship, so that editing entries is as easy as in the forward direction. | |
""" | |
### pizza/models.py ### |
from requests_oauthlib import OAuth2Session | |
from flask import Flask, request, redirect, session, url_for | |
from flask.json import jsonify | |
import os | |
app = Flask(__name__) | |
# This information is obtained upon registration of a new GitHub | |
client_id = "<your client key>" |
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. |
""" | |
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 |
[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 . |
diff --git a/trunk/config b/trunk/config | |
index 8ab7f658dda..d6a80d38e66 100644 | |
--- a/trunk/config | |
+++ b/trunk/config | |
@@ -1,11 +1,11 @@ | |
# | |
# Automatically generated file; DO NOT EDIT. | |
-# Linux/x86 5.10.15 Kernel Configuration | |
+# Linux/x86 5.11.8-arch1 Kernel Configuration | |
# |
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Copyright (c) 2008 Doug Hellmann All rights reserved. | |
# | |
""" | |
""" | |
__version__ = "$Id$" | |
#end_pymotw_header |
# Run with: | |
# docker-compose run --service-ports bucket server /tmp/ | |
# | |
# Set credentials: | |
# | |
# export AWS_ACCESS_KEY_ID=root | |
# export AWS_SECRET_ACCESS_KEY=testtest | |
# | |
# Create a bucket & put objects: | |
# |
from hypothesis import given, strategies as st | |
def q(list): | |
"""Quicksort""" | |
return [] if list==[] else q([x for x in list[1:] if x < list[0]]) + [list[0]] + q([x for x in list[1:] if x >= list[0]]) | |
@given(st.lists(st.integers(min_value=-10000, max_value=10000))) | |
def test_qsort(int_list): |