Skip to content

Instantly share code, notes, and snippets.

View rubensayshi's full-sized avatar

Ruben de Vries rubensayshi

  • Amsterdam, Netherlands
View GitHub Profile
<?php
echo "Hello " . (isset($_GET['name']) ? $_GET['name'] : "World") . "!";
?>
@rubensayshi
rubensayshi / voiture.sfi.sfinode.example.php
Created June 18, 2011 17:19
Voiture :: SFI :: SFINode
<?php
// Homepage
$coll->addItem(new SFINode('homepage', 'The homepage node containing the introduction', array(
'type' => 'page',
'title' => 'Welcome to our website',
'body' => StructuralFixtureItemBase::getLipsum(),
'field_list_items' => array(
'item #1',
'another item',
@rubensayshi
rubensayshi / voiture.sfi.sfinode.example.node_save.php
Created June 18, 2011 17:29
Voiture :: SFI :: SFINode :: node_save
<?php
$node = (object) array(
'type' => 'page',
'title' => 'Welcome to our website',
'body' => array(
'nl' => array(
0 => array(
'value' => '[lorem ipsum etc...]',
'format' => 'filtered_html',
@rubensayshi
rubensayshi / voiture.sfi.sfinode.example.reference.php
Created June 18, 2011 17:37
Voiture :: SFI :: SFINode :: reference
<?php
$nodeOne = $coll->addItem(new SFINode('none_one', 'the first node ever', array(
'type' => 'page',
'title' => 'Node One',
'body' => StructuralFixtureItemBase::getLipsum(),
)));
$coll->addItem(new SFINode('none_two', 'the second node', array(
'type' => 'page',
@rubensayshi
rubensayshi / voiture.sfi.sfimenulink.example.child.php
Created June 18, 2011 17:46
Voiture :: SFI :: SFIMenuLink :: child
@rubensayshi
rubensayshi / voiture.sfi.sfivocabulary.example.php
Created June 18, 2011 17:52
Voiture :: SFI :: SFIVocabulary
<?php
// Vocabulary
$maincats = $coll->addItem(new SFIVocabulary(array(
'machine_name' => 'main_categories',
'name' => 'Main Categories',
'i18n_mode' => 1,
)));
// Term
@rubensayshi
rubensayshi / voiture.sfi.sfimenulink.example.nid.php
Created June 18, 2011 18:02
Voiture :: SFI :: SFIMenuLink :: nid
svn ps svn:externals "voiture file:///repos/svn/demo/voiture/tags/v7.0.0" . && svn commit -m "local externals" && rm -rf voiture && svn up
@rubensayshi
rubensayshi / bash-git-prompt
Created June 18, 2011 20:00 — forked from elecnix/bash-git-prompt
bash-git-prompt
#!/bin/bash
#
# Displays the current git branch name and the dirty state in your Bash shell
# prompt. Add a line like this to your ~/.bashrc file:
#
# . ~/path/to/gist/bash-git-prompt
#
# To use this, you must enable "enable programmable completion features".
# Look at your ~/.bashrc for something like:
#
@rubensayshi
rubensayshi / symfony.info
Created June 19, 2011 11:29 — forked from naderman/symfony.info
Drupal 7.0 Symfony2 Integration (Proof of Concept)
name = Symfony
description = Symfony Integration
core = 7.x