by Asim Jalis, MetaProse.com
Create a file __main__.py
containing:
print "Hello world from Python"
Zip up the Python files (in this case just this one file) into app.zip
by typing:
#! python2 | |
""" | |
uTorrent resume.dat => qbittorrent | |
Author: robot | |
Largely based on resumedata_2015.rb, see https://github.com/qbittorrent/qBittorrent/issues/1826 for discussion. | |
Zero error tolerance is assumed. As well see error.log for warnings. | |
Feel free to change defaults in def mkfr(). |
by Asim Jalis, MetaProse.com
Create a file __main__.py
containing:
print "Hello world from Python"
Zip up the Python files (in this case just this one file) into app.zip
by typing:
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
#!/bin/bash | |
# This script will make a best-effort attempt at showing modifications | |
# to package-provided config files on a Debian system. | |
# | |
# It's subject to some pretty significant limitations: most notably, | |
# there's no way to identify all such config files. We approximate the | |
# answer by looking first at dpkg-managed conffiles, and then hoping | |
# that most of the time, if maintainer scripts are managing files | |
# themselves, they're using ucf. So, DO NOT TRUST THIS SCRIPT to find |
javascript:(function(){for(var a=0,anchors=document.querySelectorAll("a[href^='#']"),al=anchors.length,anchor;al>a;++a)anchor=anchors[a].href.split("#").pop(),anchor.length&&!document.getElementById(anchor)&&(anchors[a].style.color="#fff",anchors[a].style.backgroundColor="#f00")})() |
/* | |
* First create the keystore (to allow SSL protection) by importing the LDAP | |
* certificate (cert.pem) with: | |
* keytool -import -keystore keystore -storepass changeit -noprompt -file cert.pem | |
* | |
* You can get the certificate with OpenSSL: | |
* openssl s_client -connect ldap.server.com:636 </dev/null 2>/dev/null | sed -n '/^-----BEGIN/,/^-----END/ { p }' > cert.pem | |
* | |
* Then compile this class with: | |
* javac LdapAuth.java |
Create a template service file at /etc/systemd/system/[email protected]
. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
from datetime import datetime, timedelta | |
import functools | |
def timed_cache(**timedelta_kwargs): | |
def _wrapper(f): | |
maxsize = timedelta_kwargs.pop('maxsize', 128) | |
typed = timedelta_kwargs.pop('typed', False) | |
update_delta = timedelta(**timedelta_kwargs) |
[MyDB] | |
Description = My Database | |
Driver = FreeTDS | |
Servername = W7WS6CL832J # MSSQL server name | |
Database = mydb | |
UID = username | |
PWD = password | |
Port = 1433 | |
Charset = UTF-8 |