Skip to content

Instantly share code, notes, and snippets.

View freshface's full-sized avatar

Frederik Heyninck freshface

View GitHub Profile
var config = {
appFolder: 'app/',
assetFolder: this.appFolder + 'assets/'
};
<?php
$mailuser="user@gmail.com";
$mailpass="password";
$mailhost="{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX";
$mailbox = imap_open($mailhost,$mailuser,$mailpass) or die("<br />\nFAILLED! ".imap_last_error());
$emails = imap_search($mailbox,'ALL');
<div class="photoGallerySlideshowProjects">
<div>
<h1><a href="/portfolio/detail/blaa" title="Blaa">Blaa</a></h1>
<img src="/frontend/files/projects/album-8/195x200/testproject-netlash_nl_image1_1292427188.png" />
<p><a href="/portfolio/detail/blaa" title="Blaa">bekijk project</a></p>
</div>
<div>
<h1><a href="/portfolio/detail/project-x" title="Project X">Project X</a></h1>
public static function getMimeTypes()
{
$mimes = array( 'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
'bin' => 'application/macbinary',
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
@freshface
freshface / gist:1666509
Created January 23, 2012 23:44
Fork Profile LoginLogout Widget
<?php
class FrontendProfilesWidgetLoginLogout extends FrontendBaseWidget
{
/**
* Execute the extra
*
* @return void
*/
public function execute()
src:url(../../themes/triton/core/layout/css/'../fonts/antipasto_extrabold-webfont.eot?#iefix')
@font-face {
font-family: 'AntipastoExtraBold';
src: url('../fonts/antipasto_extrabold-webfont.eot');
src: url('../fonts/antipasto_extrabold-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/antipasto_extrabold-webfont.woff') format('woff'),
url('../fonts/antipasto_extrabold-webfont.ttf') format('truetype'),
url('../fonts/antipasto_extrabold-webfont.svg#AntipastoExtraBold') format('svg');
font-weight: normal;
font-style: normal;
$this->header->addJS('/frontend/modules/' . $this->getModule() . '/js/cycle.js', false);
Figure8\UserBundle\Entity\User:
oneToMany:
settings:
targetEntity: Figure8\UserBundle\Entity\Setting
mappedBy: user
type: entity
table: fos_users
repositoryClass: Figure8\UserBundle\Entity\SettingRepository
fields:
id:
@freshface
freshface / Query
Last active August 29, 2015 14:21
Treepaths
public static function getTreeByParent($ids)
{
$ids = (array) $ids;
$ids = implode($ids, ',');
// @todo see http://stackoverflow.com/questions/8252323/mysql-closure-table-hierarchical-database-how-to-pull-information-out-in-the-c/8288201#8288201 for visual
// the whole tree
// http://karwin.blogspot.be/2010/03/rendering-trees-with-closure-tables.html
// build query