Skip to content

Instantly share code, notes, and snippets.

View vespakoen's full-sized avatar

Koen Schmeets vespakoen

View GitHub Profile
+ {% if field.type in app.extensions.getFields|keys %}
+ {% include 'custom/fields/' ~ field.type ~ '.twig' %}
+ {% endif %}
<?php
namespace Spatial;
class Extension extends \Bolt\BaseExtension
{
function info()
{
$data = array(
@vespakoen
vespakoen / FancyLineStringEditor.js
Last active August 29, 2015 14:10
Reacty defecty =)
var React = require('react');
var GeoJsonEditor = require('./GeoJsonEditor');
var LineStringEditor2 = require('./LineStringEditor2');
var FancyLineStringEditor = React.createClass({
propTypes: {
value: React.PropTypes.object,
onChange: React.PropTypes.func.isRequired
},
@vespakoen
vespakoen / gist:fca7b92b98b74057e9da
Last active August 29, 2015 14:13
compile ES6 => ES5 for modules
'use strict';
var fs = require('fs');
var path = require('path');
var _ = require('underscore');
var exec = require('child-process-promise').exec;
var Compiler = require('traceur').NodeCompiler;
var traceurOptions = {
sourceMaps : 'inline',
@vespakoen
vespakoen / flickrbg.es5.js
Created September 21, 2015 22:37
Set your background to a random image from a flickr photoset
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _nodeFetch = require('node-fetch');
var _nodeFetch2 = _interopRequireDefault(_nodeFetch);
var _xml2js = require('xml2js');
<?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>',