Skip to content

Instantly share code, notes, and snippets.

View thiagotalma's full-sized avatar

Thiago Talma thiagotalma

View GitHub Profile
@thiagotalma
thiagotalma / cloudflare_batch.php
Created March 31, 2017 21:47
Cloudflare Batch Edit
<?php
// Form a list of all CF IP zones
// For each zone, grab all A records and TXT records matching $oldip
// For each matching record, update it to the new IP address
// Does not deal with paginated zone results so there's currently
// a maximum of 50 zones managed by this tool
$authemail = "YOU @ YOUR EMAIL . COM";
$authkey = "YOUR CLOUDFLARE API KEY";
@thiagotalma
thiagotalma / main-local.php
Last active May 15, 2018 17:20
PhpStorm Protocol (Win)
<?php
'modules' => [
'debug' => [
'class' => 'yii\debug\Module',
'traceLink' => function ($trace) {
$path = str_replace('/srv/www/myproject/', 'D:\\www\\myproject\\', $trace['file']);
return '<a href="phpstorm://open?url=file://' . $path . '&line=' . $trace['line'] . '">' . $path . ':' . $trace['line'] . '</a>';
},
]
]
@thiagotalma
thiagotalma / web-zerokiddies.conf
Last active August 29, 2015 14:15
fail2ban filters
# Fail2Ban Configuration File
#
# web-zerokiddies.conf
#
# Author: Thiago Talma
# Revision: 2015-02-13
[Definition]
badurls = admin|fck|sql|webdb|wp-login\.php|soap|manager|setup|pma|status|readme|dl-skin|download\.php|info\.php|\.\.\/|changelog\.txt