This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run in a cronjob, once a week | |
# see conditions at https://www.ipdeny.com/usagelimits.php | |
ipdeny_url="https://www.ipdeny.com/" | |
# see country codes at https://www.ipdeny.com/ipblocks/ | |
# use space to separate multiple country codes | |
country_codes="cn" | |
domain_path="$HOME/doms/testsite.beispielverein.de" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ] | |
then | |
echo "Bitte den Pfad für die Datei mit dem öffentlichen Key mitgeben: z.B. $0 ~/public.txt" | |
exit | |
fi | |
publickeyfile=$(realpath $1) | |
if [ ! -f $publickeyfile ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<configuration> | |
<!-- Leave this alone. Sets up configsectionhandler section --> | |
<configSections> | |
<section name="nant" type="NAnt.Core.ConfigurationSection, NAnt.Core" /> | |
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" /> | |
</configSections> | |
<appSettings> | |
<!-- Used to indicate the location of the cache folder for shadow files --> | |
<add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import requests | |
import json | |
url = "https://api.github.com/repos/openpetra/openpetra/issues" | |
milestone = "17" | |
S = requests.Session() | |
headers = {'Accept': 'application/vnd.github.v3+json'} | |
# see https://docs.github.com/en/rest/reference/issues#list-repository-issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// zum Aktualisieren der IP Adresse: https://dyndns.example.org/dyndns.php?domain=meinedynamische.example.org | |
if (!isset($_GET['domain'])) { | |
die('Die Angabe der Domain fehlt.'); | |
} | |
$domain = $_GET['domain']; | |
$filename = "/home/pacs/xyz00/users/dyndns/doms/example.org/etc/pri.example.org"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# lxc: linux Container library | |
# Authors: | |
# Original Debian: | |
# Daniel Lezcano <daniel.lezcano@free.fr> | |
# Changes for Raspberry Pi by: | |
# Oliver Heller <oliver@d24m.de> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# first call: | |
# mysqldump --add-drop-table database_to_correct | replace CHARSET=latin1 CHARSET=utf8 | iconv -f latin1 -t utf8 | mysql database_to_correct --default_character_set utf8 > fixed.sql | |
# then run this script | |
out = open("converted.sql", "w") | |
with open('fixed.sql', encoding='utf8') as f: | |
for line in f: | |
line = line.replace('CHARACTER SET latin1 COLLATE latin1_bin', 'CHARACTER SET utf8 COLLATE utf8_bin') | |
line = line.replace('â<80><93>', '-') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import os | |
import pathlib | |
from datetime import datetime | |
for file in os.listdir("."): | |
if file.endswith(".jpg") or file.endswith(".3gp"): | |
if '_' in file: | |
date = datetime.strptime(file.split("_", 2)[1], '%Y%m%d') | |
datestr = date.strftime('%m/%d/%Y') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service kolab-server stop | |
service kolab-saslauthd stop | |
service cyrus-imapd stop | |
service dirsrv stop | |
service wallace stop | |
service apache2 stop | |
if [ -f /usr/sbin/remove-ds-admin ] | |
then | |
sed -i "s#/usr/lib/x86_64-linux-gnu/dirsrv/perl);#/usr/lib/x86_64-linux-gnu/dirsrv/perl);\nuse lib qw(/usr/lib/dirsrv/perl);#g" /usr/sbin/remove-ds-admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a simple alternative to xbuild | |
// parse sln and csproj files, and call mcs to compile the projects. | |
// can only build libraries at the moment | |
// Copyright: Timotheus Pokorra <timotheus.pokorra@solidcharity.com> | |
// License: MIT | |
// to build: mcs builder.cs -r:System.Xml.Linq | |
using System; | |
using System.IO; | |
using System.Diagnostics; | |
using System.Xml.Linq; |
NewerOlder