Skip to content

Instantly share code, notes, and snippets.

View vespakoen's full-sized avatar

Koen Schmeets vespakoen

View GitHub Profile
@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 / 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
},
iwconfig
IWCONFIG(8) Linux Programmer’s Manual IWCONFIG(8)
NAME
<?php
namespace Spatial;
class Extension extends \Bolt\BaseExtension
{
function info()
{
$data = array(
+ {% if field.type in app.extensions.getFields|keys %}
+ {% include 'custom/fields/' ~ field.type ~ '.twig' %}
+ {% endif %}
<?php
namespace Spatial;
use CrEOF\Spatial\DBAL\Types\BinaryParser;
use CrEOF\Spatial\PHP\Types\Geometry\LineString;
use CrEOF\Spatial\PHP\Types\Geometry\Point;
class GeometryParser {
@vespakoen
vespakoen / gist:7770406
Last active December 30, 2015 03:39
array_pluck
<?php
/**
* Pluck an array of values from an array.
*
* @param array $array
* @param string $value
* @param string $key
* @return array
*/
function array_pluck($array, $value = null, $key = null)
@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;
@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'
public function action_objectinfos($id)
{
$asso = Asso::find($id);
if(Auth::guest()){
return Redirect::back();
}
elseif(Auth::user()->id == $asso->user_id){