Skip to content

Instantly share code, notes, and snippets.

View HoffmannP's full-sized avatar

Peter Hoffmann HoffmannP

View GitHub Profile
@HoffmannP
HoffmannP / test.php
Last active February 22, 2016 16:56
Wie viel Zeit kosten Funktionsaufrufe in PHP?
<?php
define('MAX', 10000);
$varianteA = '/tmp/varianteA.php';
$varianteB = '/tmp/varianteB.php';
function funcName($i) {
$n = '';
while ($i > 25) {
@HoffmannP
HoffmannP / BinäreGeschlechteridentitätQuaSchwangerschaftsvermögen.markdown
Last active January 8, 2016 14:14
Artikel: Zur binären Geschlechteridentität qua Schwangerschaftsvermögen

Zur binären Geschlechteridentität qua Schwangerschaftsvermögen

Antje Schrupp weist in ihrem Artikel "Über den Zusammenhang von Geschlecht und Biologie" auf die differenzierte Geschlechtseigenschaft "Schwangerwerden" hin und bezeichnet diese als "faktisch binär" (Abs. 11). Öffentlich weitgehend bewusst differenziert wird zwischen dem gewählten oder zugeschrieben Geschlecht (Gender) und dem davon - meist bewusst deutlich unabhängig gemachten - biologischen (Sex). Schrupp seziert nun diese beiden Geschlechtseigenschaften und richtet ihr Augenmerk auf ein dem Anschein nach völlig biologisches Kriterium, der Fähigkeit Schwanger zu werden.

Ich möchte auf Fallstricke bei dieser Kategorisierung Aufmerksam machen: Zum einen sollte klar sein, dass besonders bei dieser Kategorie neben zwei offensichtlichen Eigenschaftsausprägungen der Fall der unbekannten Ausprägung existiert. Und zwar nicht im Sinne von nicht-existent sondern im tatsächlichen Sinne von unbekannt. Relativ klar lassen sich hier die Fälle abtrennen

<!DOCTYPE html>
<html>
<meta charset="utf-8">
<style>
/* CSS goes here */
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
@HoffmannP
HoffmannP / queryFromHell.sql
Created December 2, 2015 11:44
SQL query from hell - original from our source
SELECT
p.sk_ID,
IFNULL(
IF(
!ISNULL(c.sk_ID),
c.sk_Verantwortlich,
p.sk_Verantwortlich
),
-1
) AS verantwortlich,
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="//d3js.org/d3.v3.min.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
</body>
<script src="script.js"></script>
@HoffmannP
HoffmannP / gist:9aaeccaebdea3495a872
Last active August 29, 2015 14:20
less cached for Lighttpd
#!/bin/sh
if [ -z "$1" ]; then
exit 1
fi
echo "/* Using less-cache */"
id="$(sha512sum "$1" | cut -d' ' -f1)"
file="/tmp/less.${id}.css"
#!/bin/bash
################################################################################
# full-disk-encryption-lvm-luks 2
# This is especially designed for Linux Mint
# just a modification of the glorious script by andreas haerter (kudos)
# http://blog.andreas-haerter.com/2011/06/18/ubuntu-full-disk-encryption-lvm-luks
#
# Usage:
# 1) Boot a (K)Ubuntu/LinuxMint live session
@HoffmannP
HoffmannP / gist:9714512
Last active August 29, 2015 13:57
Configuration of postfix for relay
===================================================================/etc/postfix/main.cf==========
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
append_dot_mydomain = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
inet_interfaces = localhost
mydomain = **********************
myhostname = **********************
bool candiesThrownGotChocolateBar=true, bool candyBoxBoxOpened=false, bool castleBigRoomHovenHappy=true, bool castleRoom2LitFire=true, bool castleRoom2TookObject=true, bool castleTowerFirstVisitDone=true, bool castleTowerPStoneDone=false, bool castleTowerLStoneDone=true, bool castleTowerAStoneDone=false, bool castleTowerYStoneDone=false, bool castleTowerTookTalkingCandy=false, bool castleKilledNougatMonster=true, bool cellarDone=true, bool dragonDone=true, bool dragonUnlockedCyclops=true, bool forgeFoundLollipop=false, bool forgeBoughtWoodenSword=true, bool forgeBoughtIronAxe=true, bool forgeBoughtPolishedSilverSword=true, bool forgeBoughtLightweightBodyArmour=true, bool forgeBoughtScythe=false, bool fortressRoom1ChestFound=true, bool fortressRoom3ChestFound=true, bool fourthHouseFoundLollipopOnCupboard=true, bool gameDebug=false, bool gameInvertedColors=true, bool lighthousePuzzleDone=false, bool lollipopFarmPlant1LollipopButtonUnlocked=true, bool lollipopFarmPlant10LollipopsButtonUnlocked=true, bool lollipo
@HoffmannP
HoffmannP / gist:7921504
Created December 12, 2013 00:59
Creating a copy of you harddrives for a virtual machine copy
#!/bin/bash
## VM Clone ##
VM="$1" # "MeinRechner"
System="Debian_64"
isoFolder="$2" #"/root/VirtualBox VMs/MeinRechner"
strgCtl="sata"
VBM="/usr/bin/VBoxManage"
$VBM createvm --name $VM --ostype $System --register
$VBM storagectl $VM --name $strgCtl --add sata