Skip to content

Instantly share code, notes, and snippets.

View josephscott's full-sized avatar

Joseph Scott josephscott

View GitHub Profile
#!/bin/sh
# adapted from https://github.com/mat/dotfiles/blob/master/bin/curlt
curl_format='{
"time_namelookup": %{time_namelookup},
"time_connect": %{time_connect},
"time_appconnect": %{time_appconnect},
"time_pretransfer": %{time_pretransfer},
"time_redirect": %{time_redirect},
"time_starttransfer": %{time_starttransfer},
<?php
$test_me = array(
'name' => 'Joseph Scott',
'city' => 'Sandy',
'state' => 'Utah',
);
echo "MEM: " . memory_get_peak_usage() . "\n";
<?php
$test_me = array();
$test_me['name'] = 'Joseph Scott';
$test_me['city'] = 'Sandy';
$test_me['state'] = 'Utah';
echo "MEM: " . memory_get_peak_usage() . "\n";
<?php
$test_me = new StdClass();
$test_me->name = 'Joseph Scott';
$test_me->city = 'Sandy';
$test_me->state = 'Utah';
echo "MEM: " . memory_get_peak_usage() . "\n";
<?php
class Test {
public $name;
public $city;
public $state;
public function __construct( $name, $city, $state ) {
$this->name = $name;
$this->city = $city;
$this->state = $state;
<?php
require 'PasswordHash.php';
$hasher = new PasswordHash( 8, FALSE );
$password1 = '012345678901234567890123456789012345678901234567890123456789012345678901';
$password2 = $password1 . 'Z';
echo "PASS1 : {$password1}\n";
$hash1 = $hasher->HashPassword( $password1 );
echo "HASH1 : {$hash1}\n";