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 5.3+ (CLI) required. Should work with stock PHP on Mac OS 10.8. | |
cd /tmp | |
php -r "$(curl -s https://raw.github.com/simonjodet/gumdrop/develop/installer.php|tail -n +2)" |
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 | |
$app['security.firewalls'] = array( | |
'user_firewall' => array( | |
'pattern' => new \Application\UserRequestMatcher($app['request']), | |
'form' => array('login_path' => '/login', 'check_path' => '/authenticate'), | |
'logout' => array('logout_path' => '/logout'), | |
'users' => $app->share(function () use ($app) | |
{ | |
return new \Application\UserProvider($app); | |
}), |
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 | |
class Database | |
{ | |
/** | |
* @var \Doctrine\DBAL\Connection | |
*/ | |
private $conn; | |
public function __construct(\Silex\Application $app) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom"> | |
<title>Simon's Blog</title> | |
<link href="http://blog.jodet.com/atom.xml" rel="self"/> | |
<link href="http://blog.jodet.com/"/> | |
<updated>{{ pages|reverse[0].date|date(DATE_ATOM) }}</updated> | |
<id>http://blog.jodet.com/</id> | |
<author> | |
<name>Simon Jodet</name> | |
</author> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>{% if page.title != 'Home' and page.title != '' %}{{ page.title }} - {% endif %}Simon's Blog</title> | |
<link rel="stylesheet" href="/tools/bootstrap.min.css?cache={{ "now"|date("U") }}" type="text/css" charset="utf-8"/> | |
<link rel="stylesheet" href="/style/css/style.css?cache={{ "now"|date("U") }}" type="text/css" charset="utf-8"/> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="generator" content="Gumdrop"> | |
<meta name="author" content="Simon Jodet"> | |
<link rel="alternate" type="application/rss+xml" href="http://feeds.feedburner.com/jodet/blog"/> |
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
server | |
{ | |
listen 80; | |
server_name blog.domain.com; | |
location = /50x.html | |
{ | |
root /var/www/nginx-default; | |
} | |
index index.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
git push github master # I have setup a "github" remote on my /var/www/blog_repo/ repository in order to push my commits to github automatically with this line | |
cd /var/www/blog/ # Change directory to hosted sources | |
env -i git pull origin master # Pull commits from "origin" remote (/var/www/blog_repo/) into /var/www/blog/ | |
export PATH="/var/lib/gems/1.8/bin/:$PATH" # Make sure gems are available for jekyll | |
jekyll --no-auto # Generage blog | |
php search_indexer/search_indexer.php # Update search index |
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 | |
/** | |
* This is an helper class to quickly create anonymous classes | |
* Usage: | |
* $shellWrapper = new Anonymous(); | |
* $shellWrapper->exec = function($command) use($shellWrapper) | |
* { | |
* return exec($command); | |
* }; | |
* $shellWrapper->exec('ls -la .'); |
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
server | |
{ | |
listen 80; | |
server_name website.loc www.website.loc; | |
access_log /var/log/nginx/website.access_log; | |
error_log /var/log/nginx/website.error_log; | |
root /var/www/website.loc/web/; | |
index index.php; |
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
# Install Project+: http://ciaranwal.sh/projectplus | |
mkdir -p ~/Library/Application\ Support/TextMate/Bundles | |
cd !$ | |
svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/ | |
osascript -e 'tell app "TextMate" to reload bundles' |