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
<VirtualHost *:80> | |
ServerName YOUR_SERVER_DOMAIN | |
ProxyPreserveHost On | |
ProxyPass / http://YOUR_NEW_SERVERS_IP_ADDRESS/ | |
ProxyPassReverse / http://YOUR_NEW_SERVERS_IP_ADDRESS/ | |
# i.e. | |
# ServerName your-domain.com | |
# ProxyPreserveHost On | |
# ProxyPass / http://127.0.0.1/ | |
# ProxyPassReverse / http://127.0.0.1/ |
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
(function() { | |
$.fn.extend({ | |
scrolltracker: function(step) { | |
var maxDepth; | |
maxDepth = 0; | |
return this.scroll(function() { | |
var depth; | |
depth = Math.floor($(this).scrollTop() / step); | |
if (depth > maxDepth) { | |
maxDepth = depth; |
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
## jQuery extension that tracks the current scroll depth | |
$.fn.extend | |
scrolltracker: (step) -> | |
maxDepth = 0 | |
this.scroll -> | |
depth = Math.floor($(this).scrollTop() / step) | |
if depth > maxDepth | |
maxDepth = depth | |
_gaq.push(['_trackEvent', 'ScrollDepth', depth * step]); |
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
// # CoffeeScript | |
// $(document).ready -> | |
// $(window).scrolltracker(500) | |
$(document).ready(function() { | |
return $(window).scrolltracker(500); | |
}); |
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 | |
$facebook = new Facebook(array('appId' => 'YOUR_APP_ID', 'secret' => 'YOUR_APP_SECRET')); | |
$note = array( | |
'subject' => 'Your new Note!', | |
'message' => '<h1>Your new Note</h1><p>This is your new note</p>', | |
); | |
$response = $facebook->api('/YOUR_USER_OR_PAGE_ID/notes', 'post', $note); |
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 | |
.. | |
$client = $app['goutte.client']; | |
$crawler = $client->request('GET', 'http://test.ical.ly/'); | |
.. |
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'; | |
$loader->register(); | |
$app = new Silex\Application(); | |
$app[ 'autoloader' ]->registerNamespaces(array( | |
'Symfony' => __DIR__ . '/../vendor', | |
'Caefer' => __DIR__, |
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 Caefer; | |
use Silex\Application; | |
use Silex\ServiceProviderInterface; | |
use Goutte\Client; | |
class GoutteServiceProvider implements ServiceProviderInterface | |
{ |
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
./src/silex.phar | |
./src/twig.phar | |
./src/bootstrap.php | |
./vendor/Symfony/Component/Console/... | |
./Readme.md | |
./console.php | |
./index.php | |
./views/hello.twig | |
./.htaccess |
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 Silex\Application(); | |
$app->register(new Silex\Provider\TwigServiceProvider(), array( | |
'twig.path' => __DIR__.'/views', | |
'twig.class_path' => 'phar://'.__DIR__.'/twig.phar/lib', | |
)); |