Python Cheatsheets
http://refcardz.dzone.com/refcardz/core-python
http://rgruet.free.fr/
Learn Python in 10 minutes
http://www.stavros.io/tutorials/python/
https://leanpub.com/learn-python
<?php | |
class DocInject | |
{ | |
public function __construct() | |
{ | |
$reflection = new ReflectionClass($this); | |
foreach ($reflection->getProperties() as $property) { | |
$this->processProperty($property); | |
} | |
} |
class Dummy | |
@helloStatic: (name)-> | |
"hello #{name} (static)" | |
hello: (name) -> | |
"hello #{name}" | |
alert Dummy.helloStatic("Gonzalo") | |
dummy = new Dummy |
//js.php | |
require 'jsmin.php'; | |
function checkCanGzip(){ | |
if (array_key_exists('HTTP_ACCEPT_ENCODING', $_SERVER)) { | |
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) return "gzip"; | |
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false) return "x-gzip"; | |
} | |
return false; | |
} |
Python Cheatsheets
http://refcardz.dzone.com/refcardz/core-python
http://rgruet.free.fr/
Learn Python in 10 minutes
http://www.stavros.io/tutorials/python/
https://leanpub.com/learn-python
<?php | |
echo (new \DateTime())->diff(\DateTime::createFromFormat('Y-m-d H:i:s', json_decode((new Guzzle\Http\Client('http://karmacracy.com'))->get('/api/v1/user/gonzalo123')->send()->getBody(), true)['data']['user'][0]['date_signed']))->format('%y') . "year/s old"; |