This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_python.c> | |
<FilesMatch "\.py$"> | |
AddHandler mod_python .py | |
PythonHandler mod_python.publisher | |
PythonDebug on | |
</FilesMatch> | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$(".click").toggle(function(){ | |
$("#box").css("-webkit-transform","scale(2.1) rotate(-90deg)"); }, | |
function () { | |
$("#box").css("-webkit-transform","scale(1) rotate(0)"); | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once __DIR__.'/silex.phar'; | |
$app = new Silex\Application(); | |
$app->get('/hello/{name}', function($name) { | |
return "Hello $name"; | |
}); | |
$app->run(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Silex; | |
interface ExtensionInterface | |
{ | |
function register(Application $app); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__.’/silex.phar’; | |
$app = new SilexApplication(); | |
$app->get(‘/hello/{name}’, function($name) { | |
return "Hello $name"; | |
}); | |
$app->run(); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class User { | |
protected $outfit = array(); | |
function __construct() { | |
$store = new Store(); | |
array_push($this->outfit, $store->getCloth()); | |
array_push($this->outfit, $store->getShoes()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'Twig/Autoloader.php'; | |
Twig_Autoloader::register(); | |
$loader = new Twig_Loader_Filesystem('templates'); | |
$config = array( | |
'cache' => 'cache', | |
); | |
$twig = new Twig_Environment($loader, $config); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- layout.html.twig --> | |
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" href="style.css" /> | |
<title>Welcome to Twig</title> | |
</head> | |
<body> | |
<div id="content">{% block content %}{% endblock %}</div> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$username = ''; | |
$password = ''; | |
$blogid = ''; // Can get using wp.getUsersBlogs | |
$target_host = ''; | |
$xmlrpc_method = ''; | |
function get_response($url, $context){ | |
if(!function_exists('curl_init')){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
//create a log channel | |
$log = new Logger('name'); | |
$log->pushHandler(new StreamHandler('/path/to/log', Logger::WARNING)); | |
// add records to the log |
OlderNewer