Skip to content

Instantly share code, notes, and snippets.

View TimWolla's full-sized avatar

Tim Düsterhus TimWolla

View GitHub Profile
@TimWolla
TimWolla / index.php
Last active March 8, 2022 18:04
Read htaccess auth in PHP
<?php if ($user != '') { ?>
Eingeloggt als <?php echo $user; ?>. <a href="https://logout:false@example.com/logout.php">Abmelden</a>
<?php } else { ?>
Nicht eingeloggt. <a href="login.php">Einloggen</a>
<?php } ?>
<?php if ($user != '') { ?>
<a href="secret/">Secret folder</a>
<?php } ?>
global
log stdout format raw local0
defaults
log global
resolvers my_resolvers
nameserver google 8.8.8.8:53
nameserver cloudflare 1.1.1.1:53
@TimWolla
TimWolla / dabblet.css
Last active October 21, 2021 09:38
Untitled
font-size: 5em;
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#define handle_error(msg) \
do { \
frontend http
mode http
bind :::80 v4v6
http-request lua.auth-request auth_request /is-allowed
http-request deny if ! { var(txn.auth_response_successful) -m bool }
backend auth_request
mode http
server auth_request 127.0.0.1:8080
FROM python:2
RUN apt-get update \
&& apt-get install -y gcc \
&& pip install numpy pillow \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/local/src/overviewer/ \
&& curl -fsSL https://github.com/overviewer/Minecraft-Overviewer/archive/39d588ae45d5e66f92e2c7b8923e5269e601f3b5.tar.gz -o overviewer.tar.gz \
&& tar xvf overviewer.tar.gz --strip-components=1 -C /usr/local/src/overviewer/ \

Keybase proof

I hereby claim:

  • I am TimWolla on github.
  • I am timwolla (https://keybase.io/timwolla) on keybase.
  • I have a public key whose fingerprint is AC3A A959 6922 4239 3052 C7F5 578E 867D D9B4 8C78

To claim this, I am signing this object:

#!/bin/bash
echo "$@" > /log/out
cat >> /log/out
import static org.junit.Assert.*;
import org.junit.Test;
public class KreisTest {
@Test
public final void testBerechneFlaeche() {
assertEquals(Math.PI, (new Kreis(1, 0, 0)).berechneFlaeche(), 5);
assertEquals(Math.PI * 4, (new Kreis(2, 0, 0)).berechneFlaeche(), 5);
var app, async, config, e, express, filename, fs, getPackageXml, lastUpdate, logger, packageList, path, readPackages, serverVersion, tar, updateTime, updateTimeout, updateWatcher, updating, watcher, writer, xml;
serverVersion = '1.0.0';
express = require('express');
fs = require('fs');
path = require('path');