Skip to content

Instantly share code, notes, and snippets.

<?php
$sets = array();
$fruit = array('apples', 'grapes');
$numbers = array('one', 'two', 'three');
$sets[] = &$fruit;
$sets[] = &$numbers;
$fruit[] = 'banana';
@dduleone
dduleone / mailtest.php
Last active August 29, 2015 14:08
Script to quickly test PHP mail().
<?php
/**
* mailtest.php
*
* Provides a <s>simple</s> wrapper for testing PHP's mail() function.
* Relies on sendmail
*
* @Author Dan DuLeone <[email protected]>
*
* Required:
@dduleone
dduleone / PK_US3_Player_List
Last active August 29, 2015 14:04
Phoenix Knights US3 Players prior to disband
🔥⚡Gunzzy Ѧ⚡🔥 | l+k://player?91449&52
INVITE
DISMISS
MOD FORUM
MASS MAIL
CHANGE RIGHTS
🌋⚡Jesse Sir'Cop⚡🌋 | l+k://player?27382&52
MASS MAIL
@dduleone
dduleone / player list
Created July 30, 2014 11:45
pk3_playerlist
🔥⚡Gunzzy Ѧ⚡🔥|l+k://player?91449&52
🌋⚡Jesse Sir'Cop⚡🌋|l+k://player?27382&52
🌋⚡💀DДЯҜMДSГΞЯ💀⚡🌋|l+k://player?24389&52
🌋🔥⚡️ཫᎪཇƙɑའ ⚡️🔥🌋|l+k://player?17157&52
🌋⚡Elora⚡ 🎲 🌋|l+k://player?8880&52
🌋⚡Darndogg⚡🌋ⓓ|l+k://player?24388&52
putyet|l+k://player?65133&52
🔥⚡✠White Knight8✠⑤⚡🔥|l+k://player?17189&52
🌋⚡ Pagoshus ⚡🌋 ⓓ|l+k://player?66381&52
ⓓ🌋⚡✠⃞̤༒HighKingEmeric✪✪✠⃞̤🌋|l+k://player?47335&52
@dduleone
dduleone / us3_pk.json
Created July 30, 2014 10:21
US3 PK Info
{
"59665": {
"nick": "\ud83c\udf0b\u26a1\u271fSlingshot\u2721\u272a\u272f\ud83d\udc34\u26a1\ud83c\udf0b",
"points": 22798,
"isOnVacation": false,
"alliance": {
"rankAverage": "5",
"points": "1783426",
"id": "2396",
"pointsAverage": "13113",
@dduleone
dduleone / mysqli_test.php
Last active August 29, 2015 14:04
mysqli example
<?php
/*
CREATE SCHEMA `test`;
CREATE TABLE `animals` (`name` varchar(255), `color` varchar(255), `sound` varchar(255));
INSERT INTO `animals` SET `name`='frog', `color`='green', `sound`='ribit';
INSERT INTO `animals` SET `name`='cow', `color`='white', `sound`='moo';
*/
@dduleone
dduleone / agnoster-mod.zsh-theme
Created July 15, 2014 13:43
oh-my-zsh agnoster-mod theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# Put this file:
# ~/.oh-my-zsh/themes/agnoster-mod.zsh-theme
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
@dduleone
dduleone / emptytests.php
Created July 2, 2014 20:26
empty() Testing
<?php
$nlbr = "<br />\n";
$x = new stdClass();
$x->dog = "";
$x->cat = array();
$x->snake = new stdClass();
$x->mouse = FALSE;
$x->pig = TRUE;
$x->turtle = 0;
@dduleone
dduleone / curl_example.php
Last active August 29, 2015 14:02
cURL Example
<?php
// To write/create session cookie
function initSession ($url, $cookie) {
$curlConfig = array(
CURLOPT_URL => $url, // URL you're accessing
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => $cookie, // Path to cookie file
CURLINFO_HEADER_OUT => true,
);
@dduleone
dduleone / PubSub.class.php
Last active August 29, 2015 14:01
PubSub PoC
<?php
$_NL2BR = TRUE;
// more: http://baylorrae.com/php-pubsub/
class PubSub {
private static $events = array(); // all subscriptions