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__.'/../../vendor/autoload.php'); | |
use Guzzle\Http\Client; | |
use Guzzle\Common\Event; | |
use Guzzle\Http\Message\Request; | |
use Guzzle\Http\Message\Response; | |
use Guzzle\Http\Exception\BadResponseException; | |
$url = 'http://www.amazon.com'; | |
$client = new Client($url); |
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
module-{{ global:module }}{{ | |
if page:id | |
}} page-id-{{ page:id }}{{ | |
if page:is_home | |
}} home{{ | |
endif }}{{ | |
endif }}{{ | |
if user:logged_in |
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
$url = "http://factoryjoe.com/projects/emoticons/"; | |
$html = file_get_contents($url); | |
$doc = new DOMDocument(); | |
$doc->strictErrorChecking = FALSE; | |
$doc->loadHTML($html); | |
$xml = simplexml_import_dom($doc); | |
$flags = array(); | |
foreach ($xml->body->div->div->table[1]->tbody->tr as $value) |
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 // bundles/api_v1/controllers/example.php | |
class Api_V1_Example_Controller extends Controller | |
{ | |
public $restful = True; | |
public function get_hello($name='World') | |
{ | |
return "Hello, {$name}!"; | |
} |
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
#!/bin/sh | |
set -e | |
case "$1" in | |
configure) | |
if [ -z $2 ] && [ ! -e /etc/nginx/sites-enabled/default ] ; | |
then | |
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default | |
fi |
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
// Add this right after Autoloader::register() in app/bootstrap.php | |
// In this current setup it will read composer packages from fuel/app/vendor, you can change this below | |
// Make sure to also setup your composer.json with the correct path | |
$namespaces = require APPPATH.'vendor/composer/autoload_namespaces.php'; | |
foreach ($namespaces as $namespace => $filepath) | |
{ | |
Autoloader::add_namespace($namespace, $filepath.$namespace.DS, true); | |
} |
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 | |
/** | |
* Simple, yet effective CSRF class for FuelPHP. | |
* | |
* @author Dan Horrigan | |
* @license MIT License | |
* @copyright 2011 Dan Horrigan | |
*/ | |
/** |
NewerOlder