First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
<?php | |
/** | |
* Returns all img tags in a HTML string with the option to include img tag attributes | |
* | |
* @author Joshua Baker | |
* | |
* @example $post_images[0]->html = <img src="example.jpg"> | |
* $post_images[0]->attr->width = 500 | |
* |
* @property CI_DB_active_record $db | |
* @property CI_DB_forge $dbforge | |
* @property CI_Benchmark $benchmark | |
* @property CI_Calendar $calendar | |
* @property CI_Cart $cart | |
* @property CI_Config $config | |
* @property CI_Controller $controller | |
* @property CI_Email $email | |
* @property CI_Encrypt $encrypt | |
* @property CI_Exceptions $exceptions |
doc.addPage | |
size: 'legal' | |
layout: 'landscape' |
var mongoObjectId = function () { | |
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |
<?php | |
$ch = curl_init(); | |
$method = "GET"; | |
$url = "localhost/cerberus/resraw/_search?pretty=true"; | |
$qry = '{ | |
"size" : 10, | |
"fields" : "usr", | |
"query" : { |
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/ |
license: gpl-3.0 | |
height: 600 | |
redirect: https://observablehq.com/@d3/d3-force-directed-graph |
// from http://scratch99.com/web-development/javascript/convert-bytes-to-mb-kb/ | |
function bytesToSize(bytes) { | |
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; | |
if (bytes == 0) return 'n/a'; | |
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); | |
if (i == 0) return bytes + ' ' + sizes[i]; | |
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]; | |
}; |
// String utils | |
// | |
// resources: | |
// -- mout, https://github.com/mout/mout/tree/master/src/string | |
/** | |
* "Safer" String.toLowerCase() | |
*/ | |
function lowerCase(str) { | |
return str.toLowerCase(); |