[sudo] apt-get install stunnel
cd path/to/django/project
<?php | |
/** | |
* Description of VideoStream | |
* | |
* @author Rana | |
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial | |
*/ | |
class VideoStream | |
{ | |
private $path = ""; |
<?php | |
namespace Nakigao\Model; | |
class ModelBase | |
{ | |
/** | |
* @var \PDO | |
*/ | |
private $__pdo; | |
/** |
$app->mailer = function () { | |
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', '465', 'ssl') | |
->setUsername('[email protected]') | |
->setPassword('password'); | |
$mailer = Swift_Mailer::newInstance($transport); | |
return $mailer; | |
}; |
#!/bin/sh | |
mv www/index.php index.php.saved | |
rm -rf www/* | |
# update project/ to your directory name | |
cp -a project/public/* www | |
cp project/public/.* www | |
rm -rf www/index.php | |
mv index.php.saved www/index.php |
<?php | |
/** | |
* Is a WooCommerce Product Simple or Variable | |
* | |
* see http://wordpress.org/support/topic/condition-to-check-if-product-is-simple-or-variable | |
*/ | |
if( $product->is_type( 'simple' ) ){ | |
// a simple product |
alert('hello ' + document.location.href); |
<?php | |
class BlogController extends Controller | |
{ | |
/** | |
* Posts | |
* | |
* @return void | |
*/ | |
public function showPosts() |
/* | |
check in IE, might need ":" instead of "::" | |
HTML: <p class="tooltip">Some text</p> | |
*/ | |
/* tooltip element with border */ | |
.tooltip { | |
position:relative; | |
padding:15px; | |
margin:1em 0 3em; |