Skip to content

Instantly share code, notes, and snippets.

View vespakoen's full-sized avatar

Koen Schmeets vespakoen

View GitHub Profile
<?php
public function __construct()
{
parent::__construct();
$this->filter('before', 'auth');
}
// Get Single news item
public function get_single($id, $slug = null)
<?php
public function add($name, $source = null, $dependencies = array(), $attributes = array())
{
$type = (pathinfo($source, PATHINFO_EXTENSION) == 'css') ? 'style' : 'script';
return $this->$type($name, $source, $dependencies, $attributes);
}
protected function register($type, $name, $source, $dependencies, $attributes)
diff --git a/application/bundles.php b/application/bundles.php
index 49d126b..e8b8f26 100755
--- a/application/bundles.php
+++ b/application/bundles.php
@@ -33,4 +33,8 @@
|
*/
return array();
No newline at end of file
@vespakoen
vespakoen / gist:2913014
Created June 11, 2012 22:00
3.1.9 - 3.2.0
diff --git a/application/bundles.php b/application/bundles.php
index 49d126b..e8b8f26 100755
--- a/application/bundles.php
+++ b/application/bundles.php
@@ -33,4 +33,8 @@
|
*/
-return array();
\ No newline at end of file
@vespakoen
vespakoen / menu.php
Created November 29, 2012 15:26 — forked from sineld/menu.php
menu
echo Menu::handler('sineld', array('class' => 'nav'))
->add('admin', '<i class="icon-home"></i>Ana Sayfa</a>')
->add('#', '<i class="icon-edit"></i>Duyurular <b class="caret"></b>',
Menu::items('notify', array('class' => 'dropdown-menu'), 'ul')
->add('admin/notify/add', '<i class="icon-pencil"></i>Ekle')
->add('admin/notify/list', '<i class="icon-file"></i>Listele')
, array('class'=>'dropdown-toggle', 'data-toggle'=>'dropdown'), array('class'=>'dropdown'))
->add('#', '<i class="icon-leaf"></i>Bayi <b class="caret"></b>',
@vespakoen
vespakoen / Web Components
Created December 8, 2012 13:24
Web Components test
var Wec = {
Components: {},
Renderers: {
Ratchet: {}
}
};
// Component
// ------
//
@vespakoen
vespakoen / gist:4240268
Created December 8, 2012 13:25
Web Components test
var Wec = {
Components: {},
Renderers: {
Ratchet: {}
}
};
// Component
// ------
//
public function action_objectinfos($id)
{
$asso = Asso::find($id);
if(Auth::guest()){
return Redirect::back();
}
elseif(Auth::user()->id == $asso->user_id){
@vespakoen
vespakoen / aliases
Created August 9, 2013 09:42
Git status / diff for subfolders
alias gds='dir=`pwd`; for f in `ls -d */`; do echo "\nRunning git status for: $f" && cd $dir/$f && git --no-pager status; done; cd $dir'
alias gdd='dir=`pwd`; for f in `ls -d */`; do echo "\nRunning git diff for: $f" && cd $dir/$f && git --no-pager diff; done; cd $dir'
@vespakoen
vespakoen / menu_stuff.php
Created September 3, 2013 09:36
What's on the menu?
<?php
namespace Illuminate\Support;
use Closure;
use Countable;
use ArrayAccess;
use ArrayIterator;
use IteratorAggregate;