View pivotal_export.php
<?php | |
/* | |
Mantis -> PivotalTracker export script | |
Based on scripts from this support thread: | |
- http://community.pivotaltracker.com/pivotal/topics/synchronize_pivotal_tracker_with_mantis | |
To configure: | |
1.) Put this script in your Mantis root folder (one that contains 'core.php') | |
2.) Create an "Other" integration in Pivotal | |
3.) In the integration set a Mantis user/pass that has read rights on the project |
View xss_clean.php
<?php | |
/* | |
* XSS filter, recursively handles HTML tags & UTF encoding | |
* Optionally handles base64 encoding | |
* | |
* ***DEPRECATION RECOMMENDED*** Not updated or maintained since 2011 | |
* A MAINTAINED & BETTER ALTERNATIVE => kses | |
* https://github.com/RichardVasquez/kses/ | |
* | |
* This was built from numerous sources |
View command.sh
# Here a few bash one-liners that helped me analyze / fight a weak DOS attack against debuggable.com. Mostly for future reference. | |
# The attacker was opening lots of tcp connections without sending data, I believe it's called a SYN flood, see: http://tools.ietf.org/html/rfc4987#section-3.2 | |
# Step 0: Check what is going on at port 80 | |
$ netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c | |
# Step 1: Increase the number of available fds | |
$ ulimit -n 32000 | |
# Step 2: Restart your webserver, for me: |
View fft.php
<?php | |
// !!! Warning: for reference, not debugged | |
################################################################### | |
# PHP_Fourier 0.03b | |
# Original Fortran source by Numerical Recipies | |
# PHP port by Mathew Binkley (binkleym@nukote.com) | |
################################################################### |
View wordpress-plugin-api.php
<?php | |
/* | |
Retrieve items from the WordPress.org plugin API | |
Original source: http://pastebin.com/7Ji8rD2P | |
Docs v1.0: http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/ | |
Usage: | |
http://{host}/wordpress-plugin-api.php?page_start=9&per=20&pages=10&info=1 | |
GET['page_start'] => Page-numer to start retreiving data on |
View TCB_JSON_API.php
<?php | |
/** | |
* Creates JSON class for Tom C. Barrett to load tickets via a RESTful API: | |
* | |
* @example: | |
* | |
* URL: http://example.com/api/ticket/12345 | |
* | |
* @see: | |
* |
View generate_update.sh
#!/usr/bin/env bash | |
echo "@@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ " | |
echo "@@@ @@@ @@@@@@@@ @@@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ " | |
echo "@@! !@@ @@! @@!@!@@@ @@! @@! @@! !@@ " | |
echo "!@! @!! !@! !@!!@!@! !@! !@! !@! @!! " | |
echo " !@@!@! @!!!:! @!@ !!@! @!! @!!!:! @!@@!@! " | |
echo " @!!! !!!!!: !@! !!! !!! !!!!!: !!@!!! " | |
echo " !: :!! !!: !!: !!! !!: !!: !!: :!! " | |
echo ":!: !:! :!: :!: !:! :!: :!: :!: !:! " |
View svn_deploy.php
$svn_address = "https://domain/"; | |
$svn_user = "foo"; | |
$svn_user = "foopass"; | |
$web_path = "/var/www/foo.com/public_html/"; | |
$temp_path = "/data/tmp/"; | |
$backup_path = $path . "/data/backup/"; | |
// Checkout SVN | |
$svn_command = "svn export " . $svn_address . " " . $temp_path "/ --username=" . $svn_user . " --password="; | |
echo $svn_command . "<br />"; |
View currency-to-float.php
<?php | |
/* | |
* Human-format currency $'s converted to machine floating points | |
*/ | |
// Dollar amount via GET (not very secure) | |
$raw_dollar_amount = ( isset($_GET['dollar_amount']) ) ? htmlentities( $_GET['dollar_amount'], ENT_QUOTES, 'UTF-8' ) : FALSE; | |
if ( $raw_dollar_amount ) { | |
// Create a return value in case nothing done | |
$float_dollar_amount = $raw_dollar_amount; |
View benchmark_wordpress_seo-auto-linker.php
<?php | |
/* | |
* Usage: | |
* 1. Paste into Debug Bar console and Run | |
* 2. Run it several times (just in case iTunes is running on your dev server) | |
* | |
* Benchmarking Alternatives: | |
* - Wrap the real SEO Auto Linker for wp-cli and replace the call to content() | |
* - Add this quick & dirty benchmark loop to Debug Bar | |
* |
OlderNewer