Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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 | |
LINES=$(tput lines) | |
COLUMNS=$(tput cols) | |
declare -A snowflakes | |
declare -A lastflakes | |
clear |
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 | |
/* | |
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 |
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
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. |
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 addedcase-insensitive
: all patterns are case insensitive- User code section is included in the generated module
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
#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 |
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
_________________________________________ | |
/ \ | |
| _______________________________________ | | |
| __ / __________________ / ______ < Muh! | | |
| > \ \ | | | | ------ | | | | \ ^__^ | | | | |
| | | \ | | (oo)\_______ | | | | (__)\ | | |
| )\/\ | | | | | | ||----w | | | | \ || | | |
| || / | | | | ------------------ | | | | | | |
| \ ^__^ | | | | \ (oo)\_______ | | | | | | |
| (__)\ )\/\ | | | | ||----w | | | | \ || | |
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 | |
$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]); |
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
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? |
NewerOlder