Place the .timer
and .service
file in the /etc/systemd/system/
folder.
To use, let's assume I want to restart nginx every night. Then I'd do:
systemctl enable --now [email protected]
Place the .timer
and .service
file in the /etc/systemd/system/
folder.
To use, let's assume I want to restart nginx every night. Then I'd do:
systemctl enable --now [email protected]
/** | |
Calculates the cartesian product of an arbitrary number of lists. | |
Given `[[1, 2, 3], ["a", "b"]]`, it will produce | |
``` | |
[ | |
[1, "a"], | |
[2, "a"], | |
[3, "a"], |
#!/usr/bin/env perl | |
print "* Blogs\n"; | |
while (<>) { | |
if (/text="(.*?)">/) { | |
print "** $1 :$1:\n"; | |
} | |
if (/text="(.*?)" type=".*?" xmlUrl="(.*?)"/) { | |
print "*** [[$2][$1]]\n" |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
''' | |
Usage: {} <ksp-fosdem.txt> <result.txt> | |
Marks which keys you have verified from a keysigning party. | |
Tested on FOSDEM keysigning party 2017. | |
''' |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
''' | |
A simple program which migrates an exported Ghost blog to Hugo. | |
It assumes your blog is using the hugo-icarus theme, but should | |
work for any theme. The script will migrate your posts, including | |
tags and banner images. Furthermore, it will make sure that | |
all your old post urls will keep working by adding aliases to them. | |
The only thing you need to do yourself is copying the `images/` |
#!/bin/bash | |
TEMPDIR=/tmp/hphostspfsense | |
# Move to temporary directory | |
mkdir -p $TEMPDIR | |
rm -rf $TEMPDIR/* | |
cd $TEMPDIR |
:: Required: git, Visual Studio 10.0 Express, Visual Studio 9 Express, | |
:: Windows 7 SDK (.NET 4), Windows 7 SDK (.NET 3.5), Anaconda/Miniconda | |
::::::::::::::::::::::::::::::::::: | |
:: User configurable stuff start :: | |
::::::::::::::::::::::::::::::::::: | |
:: These depends on where you installed Anaconda. | |
:: Python2 or Python3 doesn't matter but you need both 32bit and 64bit versions. | |
set ANACONDA_BASE=C:\Users\YOURUSERNAME\Anaconda |
### MATPLOTLIBRC FORMAT | |
# This is a sample matplotlib configuration file - you can find a copy | |
# of it on your system in | |
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it | |
# there, please note that it will be overridden in your next install. | |
# If you want to keep a permanent local copy that will not be | |
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux | |
# like systems) and C:\Documents and Settings\yourname\.matplotlib | |
# (win32 systems). |
from multiprocessing.managers import BaseManager | |
from mathenate import mathenate | |
#Define manager | |
class QueueManager(BaseManager): pass | |
QueueManager.register('get_job_queue') | |
QueueManager.register('get_result_queue') | |
#Connect to server | |
m = QueueManager(address=('my.computer.org', 50000), authkey='password') |