I hereby claim:
- I am lornajane on github.
- I am lornajane (https://keybase.io/lornajane) on keybase.
- I have a public key whose fingerprint is 6AED D723 08F8 0865 FE8B 5A39 7DFC 33E8 65AB FE1F
To claim this, I am signing this object:
<?php | |
$id = filter_input(INPUT_POST, "id", FILTER_SANITIZE_STRING); | |
$data = ["username" => filter_input(INPUT_POST, "name", FILTER_SANITIZE_STRING), | |
"comment" => filter_input(INPUT_POST, "comment", FILTER_SANITIZE_STRING), | |
]; | |
$posts->updateOne(["_id" => new MongoDB\BSON\ObjectID($id)], ['$push' => ["comments" => $data]]); |
vagrant up | |
Bringing machine 'joindin' up with 'virtualbox' provider... | |
==> joindin: Importing base box 'joindin/development'... | |
==> joindin: Matching MAC address for NAT networking... | |
==> joindin: Setting the name of the VM: vm_joindin_1464623655510_48026 | |
==> joindin: Clearing any previously set network interfaces... | |
==> joindin: Preparing network interfaces based on configuration... | |
joindin: Adapter 1: nat | |
joindin: Adapter 2: hostonly | |
==> joindin: Forwarding ports... |
I hereby claim:
To claim this, I am signing this object:
<?php | |
class Message | |
{ | |
public function __construct($msg, $user) { | |
$this->msg = $msg; | |
$this->user = $user; | |
$this->created = new DateTime(); | |
} |
function makeImgTag($src) { | |
return "<img src=\"" . $src . "\" />"; | |
} |
Average time to run bench.php on my laptop, by PHP version | |
• 5.2.17: 3.77 seconds | |
• 5.3.23: 2.63 seconds | |
• 5.4.15: 1.98 seconds | |
• 5.5RC1: 2.11 seconds |
<?php | |
ini_set('user_agent', "PHP"); // github requires this | |
$api = 'https://api.github.com'; | |
$url = $api . '/users/lornajane/gists'; | |
// make the request | |
$response = file_get_contents($url); | |
// check we got something back before decoding |
If I had the time, I'd make a rhyme |
Some riveting text |
<?php | |
// phpinfo(); | |
echo "verb: " . $_SERVER['REQUEST_METHOD'] . "\n"; | |
echo "headers:"; | |
var_dump(apache_request_headers()); | |
echo "\n"; |