Skip to content

Instantly share code, notes, and snippets.

View TimWolla's full-sized avatar

Tim Düsterhus TimWolla

View GitHub Profile
@epixoip
epixoip / cloudflare_challenge
Last active December 2, 2023 11:53
How I obtained the private key for www.cloudflarechallenge.com
I wasn't first to get the key. Nor was I second, third, or even fourth. I'm probably not even the
10th to get it (ok, looks like I was the 8th.) But I'm happy that I was able to prove to myself
that I too could do it.
First, I have to admit I was a skeptic. Like the handful of other dissenters, I had initially
believed that it would be highly improbable under normal conditions to obtain the private key
through exploiting Heartbleed. So this was my motivation for participating in Cloudflare's
challenge. I had extracted a lot of other things with Heartbleed, but I hadn't actually set out to
extract private keys. So I wanted to see first-hand if it was possible or not.
_________________________________________
/ \
| _______________________________________ |
| __ / __________________ / ______ < Muh! |
| > \ \ | | | | ------ | | | | \ ^__^ | | |
| | | \ | | (oo)\_______ | | | | (__)\ |
| )\/\ | | | | | | ||----w | | | | \ || |
| || / | | | | ------------------ | | | | |
| \ ^__^ | | | | \ (oo)\_______ | | | | |
| (__)\ )\/\ | | | | ||----w | | | | \ || |
@ck-on
ck-on / ocp.php
Last active March 25, 2024 09:30
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
<?php
$input = "root(27,3)";
$number = '(?:-?\d+(?:\.\d+)?)';
while (!preg_match('/^'.$number.'$/', $input)) {
$input = preg_replace_callback('/\(\s*('.$number.')\s*\)/', function ($matches) {
return $matches[1];
}, $input);
$input = preg_replace_callback('/('.$number.')\s*\^\s*('.$number.')/', function ($matches) {
return pow($matches[1], $matches[2]);
AW Map Editor file format specifications.
- by João Pedro S. Francese (Roma_emu) [joaofrancese@gmail.com]
- last updated on February 04, 2008
Please inform me before using this file format in your project - but please DO use it,
if it involves AW maps! A standard file format is good for everyone, because it makes sure
the files are compatible between different programs. If you use it, please credit Kamek
(the file format's creator) and me (the map editor's creator) somewhere. :)
Personally I would prefer if you didn't try to make another editor...
But it's not really up to me, is it?
@hank
hank / insane_kernel_macro_solution.c
Created April 12, 2012 07:10
The solution to Linus' question on resolving undefined macros in the preprocessor to 0, as well as resolving defined macros to their values.
#include <stdio.h>
#define CONFIG_FOO 1
#define CONFIG_NOO 0
#define is_set(macro) is_set_(macro)
#define macrotest_1 ,
#define is_set_(value) is_set__(macrotest_##value)
#define is_set__(comma) is_set___(comma 1, 0)
#define is_set___(_, v, ...) v
@TimWolla
TimWolla / gist:1855419
Created February 17, 2012 21:00
Coding with Love
<?php
class ♥ {
}
$♥ = new ♥();
@zaach
zaach / 0_new.md
Created January 22, 2012 23:15
New Jison 0.3 features

Some improvements have been made for parser and lexer grammars in Jison 0.3 (demonstrated in the FlooP/BlooP example below.)

For lexers:

  • Patterns may use unquoted characters instead of strings
  • Two new options, %options flex case-insensitive
  • flex: the rule with the longest match is used, and no word boundary patterns are added
  • case-insensitive: all patterns are case insensitive
  • User code section is included in the generated module
@goozbach
goozbach / gist:1507318
Created December 21, 2011 19:26 — forked from sontek/snowjob.sh
Make your terminal snow
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear
@sontek
sontek / snowjob.sh
Last active April 5, 2024 06:51
Make your terminal snow
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear