This file contains hidden or 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
-- -------------------------------------------------------- | |
-- Host: xx | |
-- Server Version: xx | |
-- Server Betriebssystem: xx | |
-- HeidiSQL Version: 9.3.0.4984 | |
-- -------------------------------------------------------- | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET NAMES utf8mb4 */; | |
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; |
This file contains hidden or 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
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET NAMES utf8mb4 */; | |
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; | |
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; | |
-- Exportiere Struktur von Tabelle adr_postleit | |
CREATE TABLE IF NOT EXISTS `adr_postleit` ( | |
`plz` varchar(5) NOT NULL, | |
`ort` varchar(50) DEFAULT NULL, | |
`kreis_nr` varchar(5) DEFAULT NULL, |
This file contains hidden or 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 | |
$f3 = require('lib/base.php'); | |
$f3->set('DEBUG',5); | |
$test=new Test(); | |
$dbpath = __DIR__ . '/_test.sqlite'; | |
echo "Using test db: $dbpath\n"; | |
$db=new DB\SQL('sqlite:'.$dbpath); |
This file contains hidden or 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
\documentclass | |
[foldmarks=true,foldmarks=BlmTP,firstfoot=true, | |
fromalign=no,fromrule=no,backaddress=plain,refline=narrow, | |
version=last]{scrlttr2} | |
\usepackage[utf8]{inputenc} | |
\usepackage[ngerman]{babel} | |
\usepackage{graphics} | |
\LoadLetterOption{../mwbrief} | |
This file contains hidden or 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/sh | |
#Copyright (C) 2015 Max Weller | |
#This program comes with ABSOLUTELY NO WARRANTY. This is free | |
#software, and you are welcome to redistribute it under certain | |
#conditions; see LICENSE for details of the BSD 2-Clause License | |
if [ $# -eq 0 -o "-h" = "$1" -o "-help" = "$1" -o "--help" = "$1" ]; then | |
cat <<EOHELP | |
Usage: $0 MANIFEST PUBKEY... | |
This file contains hidden or 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/perl -w | |
open SHD, "<", "/etc/shadow" or die "cannot open /etc/shadow: $_"; | |
while(<SHD>) { | |
@fields = split /:/; | |
print("\ndn: uid=$fields[0],ou=People,dc=fachschaft,dc=informatik,dc=tu-darmstadt,dc=de\n"); | |
print("changetype: modify\n"); | |
print("replace: userPassword\n"); | |
print("userPassword: {crypt}$fields[1]\n"); | |
} |
This file contains hidden or 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
zone.txt: last_change | |
pdnssec rectify-all-zones | |
echo "SELECT name,type,content from records;" | mysql pdns > new_zone.txt | |
diff zone.txt new_zone.txt > zone.diff | |
rm zone.txt | |
mv new_zone.txt zone.txt | |
gzip --stdout zone.diff > diffs/zone.diff.$(date +"%Y%m%d%H%M") | |
mysqldump pdns | ssh -i /root/.ssh/copydns_key ns3.teamwiki.net "mysql pdns" |
This file contains hidden or 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 | |
RSNAPDIR=/.private/.snapshots | |
EXPDIR=$1 | |
if [ -z "$EXPDIR" ]; then | |
echo Please give folder | |
exit 12 | |
fi |
This file contains hidden or 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
function check_parens(str) { | |
var br=0,skip=false,instr=false; | |
for(var i = 0, len = str.length; i<len; i++) { | |
if(skip) { skip=false; continue; } | |
var z = str[i]; | |
switch(z) { | |
case "[":case "{":case "(": if(!instr)br++;break; | |
case "]":case "}":case ")": if(!instr)br--; if(br==0)return i; break; | |
case "\"":case "'": instr=!instr; | |
case "\\": skip=true; break; |
This file contains hidden or 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/python | |
# Downloads the current "Astronomy Picture of the Day" from nasa.gov and sets as wallpaper | |
# | |
# Installation steps: | |
# - store this file somewhere and take note of the path | |
# - change WALLPAPER_DIR to some folder in your home directory | |
# and create the folder | |
# - make it executable: | |
# chmod a+x /path/to/change_wallpaper | |
# - follow instructions given in the .plist file to make it run daily |