Skip to content

Instantly share code, notes, and snippets.

@poison
poison / mysql_backup.py
Last active November 28, 2018 09:11 — forked from mcuelenaere/mysql_backup.py
Script to automate creating a MySQL backup using LVM snapshots, over multiple disks on AWS
#!/usr/bin/python
# -*- coding: utf-8 -*-
import boto3
import re
import subprocess
import os
import tempfile
import shutil
@poison
poison / bruteforcer.php
Created May 21, 2015 08:00
Puzzle brute forcer
<?php
for ($a = 0; $a < 9; $a++) {
for ($b = 0; $b < 9; $b++) {
for ($c = 1; $c < 9; $c++) {
echo ".";
for ($d = 0; $d < 9; $d++) {
for ($e = 0; $e < 9; $e++) {
for ($f = 0; $f < 9; $f++) {
for ($g = 0; $g < 9; $g++) {
@poison
poison / sites-available_jira-ext
Created May 12, 2015 21:47
nginx configuration for jira proxying behind vpn (jira.internal in this case)
server {
listen *:80;
server_name jira.example.com;
client_max_body_size 10M;
satisfy any;
allow 10.0.0.0/8;
allow 2.4.6.8/32;
--TEST--
testing deep nesting
--FILE--
<?php
$T = new Blitz();
$body = <<<BODY
name: {{struct.name}}
age: {{struct.age}}
@poison
poison / BLITZ_ZVAL_NOT_EMPTY.patch
Created May 26, 2014 18:42
Blitz can now check if objects are not null (= have attributes) + test
commit 2dfbec40e85b398a83dd88ab777cdf776abf3d43
Author: Nicolas Van Eenaeme <nicolas@netlog.com>
Date: Wed May 21 22:14:16 2014 +0200
Blitz can now check if objects are not null (= have attributes)
diff --git a/php_blitz.h b/php_blitz.h
index 1b9133c..a748421 100644
--- a/php_blitz.h
+++ b/php_blitz.h
@poison
poison / loop.patch
Last active August 29, 2015 14:01
This patch enables you to loop over structures. See the test for more details
From 84b8814377c18e8ccdc3e6f1e4eb1e9d1828b212 Mon Sep 17 00:00:00 2001
From: Nicolas Van Eenaeme <nicolas@netlog.com>
Date: Tue, 13 May 2014 19:55:18 +0200
Subject: [PATCH] Enabled iteration over objects!
Fixed the test to check for mixed array contents
Added test for new loop
---
blitz.c | 32 +++++++++++++++++++++-----------