Skip to content

Instantly share code, notes, and snippets.

View janhalfar's full-sized avatar
💭
programming

Jan Halfar janhalfar

💭
programming
View GitHub Profile
@janhalfar
janhalfar / demo.php
Created July 24, 2012 08:49
Foomo.Huckleberry usafe example
// Huckleberry less usage example
\Foomo\Huckleberry\Less::create(
// in which module is your less file
\Foomo\Huckleberry\Module::NAME,
// name of the less file
'demo',
// give it a version <- makes deployments easier, because caches
// will not "work"
'alpha-01'
@janhalfar
janhalfar / xdebug.ini
Created December 30, 2011 21:29
Foomo.Sandbox /etc/php5/conf.d/xdebug.ini
[xdebug]
; this is obviously very specific for the install
; be aware, that zend_extensions have to be loaded
; with their full path, even if they are in
; extension_dir
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
; this is specific to your machine i.e. the machine
; your IDE / debugger is running on
xdebug.remote_host=192.168.56.1
@janhalfar
janhalfar / gist:1540462
Created December 30, 2011 16:14
Foomo.Sandbox /etc/apache2/envvars
# this is an excerpt of the file, do not replace the whole file
# and again - this is developemnt only
export APACHE_RUN_USER=foomo
export APACHE_RUN_GROUP=foomo
@janhalfar
janhalfar / gist:1540440
Created December 30, 2011 16:07
Foomo.Sandbox /etc/exports
# the important part here is the mapping of the anonymous user to the foomo user,
# so that there are no nasty rights conflicts, when mounting over nfs
#
# obviously you need to have the right uid and gid for the foomo user
# disclaimer: this is for development purposes only !!!
/var/www *(rw,nohide,insecure,no_subtree_check,async,all_squash,anonuid=1000,anongid=1000)
@janhalfar
janhalfar / gist:1070750
Created July 7, 2011 22:57
Foomo config facebook usage example
<?php
$facebook = Foomo\Config::getConf(
My\App\Module::NAME,
Foomo\Facebook\Apps\DomainConfig::NAME
)->getFacebook();
@janhalfar
janhalfar / DomainConfig.php
Created July 7, 2011 22:48
facebook domain config example
<?php
namespace Foomo\Facebook\Apps;
use Foomo\Config\AbstractConfig;
use Facebook;
/**
* facebook app domain specific configuration
*/
<?php
// facebook API usage example from
// http://www.joeyrivera.com/2010/facebook-graph-api-app-easy-w-php-sdk/
require_once ‘library/facebook.php’;
$app_id = "yourappid";
$app_secret = "yourappsecret";