- Install & Setup
- Write a simple Router
- Zephir rewritten version
- Extension installation and testing
This file contains 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 declare(strict_types=1); | |
require_once "✨.🐘"; | |
✨($_)->strlen("foo")->var_dump($_); |
This file contains 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
#!/bin/bash | |
# NB: First install nscd with sudo apt-get install nscd | |
# run this command to flush dns cache: | |
sudo /etc/init.d/dns-clean restart | |
# or use: | |
sudo /etc/init.d/networking force-reload | |
# Flush nscd dns cache: | |
sudo /etc/init.d/nscd restart |
This file contains 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
[Unit] | |
Description=consul agent | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/consul | |
Environment=GOMAXPROCS=2 | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d |
This file contains 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
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
Website:
http://prediction.io
Install Guide:
http://docs.prediction.io/installation/install-predictionio-on-linux.html
This file contains 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
ssh_options[:keys] = [File.join(Dir.pwd, "config", "ubuntu.pem")] | |
set :application, "MyAPPNAME" | |
set :repository, "git@github.com:necromant2005/MYAPPName.git" | |
# If you aren't deploying to /u/apps/#{application} on the target | |
# servers (which is the default), you can specify the actual location | |
# via the :deploy_to variable: | |
set :deploy_to, "/var/www/#{application}" |
This file contains 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
var page = require('webpage').create(); | |
page.open('http://www.website.com/', function (status) { | |
if (status === 'success') { | |
captureAjaxResponsesToConsole(); | |
} | |
}); | |
function captureAjaxResponsesToConsole() { | |
// logs ajax response contents to console so sublime's onConsoleMessage can use the contents |
This file contains 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 | |
// in ZF2 project, place this in ./bin directory | |
chdir(dirname(__DIR__)); | |
$zf2Path = (getenv('ZF2_PATH') ?: 'vendor/ZendFramework/library'); | |
require_once $zf2Path . '/Zend/Loader/AutoloaderFactory.php'; | |
require_once $zf2Path . '/Zend/Loader/StandardAutoloader.php'; | |
use Zend\Loader\AutoloaderFactory; | |
use Zend\Loader\StandardAutoloader; |
This file contains 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 | |
// in ZF2 project, place this in ./bin directory | |
chdir(dirname(__DIR__)); | |
$zf2Path = (getenv('ZF2_PATH') ?: 'vendor/ZendFramework/library'); | |
require_once $zf2Path . '/Zend/Loader/AutoloaderFactory.php'; | |
require_once $zf2Path . '/Zend/Loader/StandardAutoloader.php'; | |
use Zend\Loader\AutoloaderFactory; | |
use Zend\Loader\StandardAutoloader; |
NewerOlder