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
// Our book class. We can still iterate over our chapters with the | |
// help of the iteratorAggregate implementation. | |
class Book implements IteratorAggregate { | |
protected $_title; | |
protected $_author; | |
protected $_chapters; | |
protected $_it = null; | |
function __construct($title, $author) { |
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
CREATE TABLE biography (id INT AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, description VARCHAR(50) NOT NULL, biography LONGTEXT NOT NULL, path VARCHAR(255) DEFAULT NULL, dt_added DATETIME NOT NULL, dt_updated DATETIME NOT NULL, joindin_url VARCHAR(250) NOT NULL, slideshare_url VARCHAR(250) NOT NULL, blog_url VARCHAR(250) NOT NULL, homepage_url VARCHAR(250) NOT NULL, INDEX IDX_E3B3665C7E3C61F9 (owner_id), PRIMARY KEY(id)) ENGINE = InnoDB; | |
CREATE TABLE fos_user (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(255) NOT NULL, username_canonical VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, email_canonical VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, locked TINYINT(1) NOT NULL, expired TINYINT(1) NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)', credentials_expired T |
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
\documentclass[]{article} | |
\begin{document} | |
\title{This is the title of the article} | |
\author{Joshua Thijssen} | |
\date{\today} | |
\maketitle | |
\section{In the beginning} |
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
package { [ 'php-pdo', 'php-mysql, 'php-xml', 'php-gd', ... ] : | |
ensure => 'present', | |
require => Package['php'], | |
} |
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
class Model_Blog_Entity extends Model_Entity { | |
protected $_id; | |
protected $_title; | |
protected $_post; | |
protected $_author; | |
public function getId() { | |
return $this->_id; } | |
public function setId() { | |
$this->_id = $id; |
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 | |
# | |
# Symfony2 App/Console autocompletion (commands and arguments only) | |
# | |
# Usable for both bash and zsh (probably) | |
# | |
# Usage: | |
# Load the script (or add to your .bashrc) | |
# | |
# source ./complete_console.sh |
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
Vagrant::Config.run do |config| | |
# This vagrant will be running on centos 6.2, 64bit with puppet provisioning | |
config.vm.box = 'centos-62-64-puppet' | |
config.vm.box_url = 'http://packages.vstone.eu/vagrant-boxes/centos/6.2/centos-6.2-64bit-puppet-vbox.4.1.12.box' | |
# Use :gui for showing a display for easy debugging of vagrant | |
config.vm.boot_mode = :gui | |
config.vm.define :project do |project_config| | |
project_config.vm.host_name = "www.example-project.dev" |
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 | |
// Crude check. Off course this should be stored in a (memory) database. $token is an | |
// access token that is provided by oauth. | |
$token = $_SERVER['HTTP_X_AUTH_TOKEN']; | |
if ($token == "mellon") { | |
header("X-Api-User: Gandalf"); | |
header("X-Api-Context: Middle-Earth"); | |
header("Cache-Control: public, max-age=120"); |
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
%{ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "node.h" | |
#include "parser.tab.h" | |
%} |
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
hashes and lists and other data structures | |
------------------------------------------ | |
The current idea for shorthand notation: | |
lists: | |
[ 1, 2, 3, 4] | |
hash: | |
{ "foo":1, "bar":2, 3:"baz" } |