Skip to content

Instantly share code, notes, and snippets.

View pstuifzand's full-sized avatar

Peter Stuifzand pstuifzand

View GitHub Profile
A BEGIN
@yield('content')
A END
A BEGIN
@yield('content')
A END
@pstuifzand
pstuifzand / wrapped.blade.php
Last active November 8, 2016 22:21
Blade directives that allow you to wrap a piece of your template with another template.
@wrapper('wrapper')
<p>content</p>
@endwrapper

Keybase proof

I hereby claim:

  • I am pstuifzand on github.
  • I am pstuifzand (https://keybase.io/pstuifzand) on keybase.
  • I have a public key ASBUakBmzTLIu7inmeDSVLVg-aHZM55NRV53FuVmOQNXKAo

To claim this, I am signing this object:

@pstuifzand
pstuifzand / Model_Observer.php
Created March 8, 2015 13:04
Use Magento (Zend_Mail) with Mailcatcher
<?php
class Test_Test_Model_Observer {
public function _construct() {}
public function fixEmailConfig($observer) {
if (Mage::getStoreConfigFlag('dev/email/enabled')) {
$ip = $_SERVER["REMOTE_ADDR"];
$config = array('port' => '1025');
@pstuifzand
pstuifzand / parser.pl
Created March 14, 2012 21:34
Parser built with Marpa::XS
use 5.10.1;
use strict;
use Marpa::XS;
my $grammar = Marpa::XS::Grammar->new({
actions => 'Action',
start => 'Parser',
rules => [
{ lhs => 'Parser', rhs => [ qw/Expression/ ], action => 'Parser' },
@pstuifzand
pstuifzand / Lisp.pm
Last active March 20, 2016 06:36
Simple Lisp parser for Marpa
package Stuifzand::Lisp;
use Marpa::R2;
sub new {
my ($class) = @_;
my $self = bless {}, $class;
$self->{grammar} = Marpa::R2::Scanless::G->new(
@pstuifzand
pstuifzand / marpa-grammar.vim
Created April 8, 2012 11:02
Vim syntax highlighting for Marpa
" Vim syntax file
" Language: Marpa grammar
" Maintainer: Peter Stuifzand <peter@tweevijftig.nl>
" URL: http://peterstuifzand.nl
" Version: 1
" Last Change: 2012 Apr 1
"
" Read the HTML syntax to start with
if version < 600
@pstuifzand
pstuifzand / Makefile
Last active December 23, 2015 14:39
Example of Marpa in C++.
all: main
clean:
rm -f main.o
rm -f main
main.cpp: marpa.h
main: main.cpp errors.cpp
@pstuifzand
pstuifzand / Dockerfile
Created July 24, 2013 13:06
Pinto Dockerfile
FROM ubuntu
RUN apt-get -y install curl perl
RUN apt-get -y install build-essential
RUN curl -L http://getpinto.stratopan.com | bash
EXPOSE 3111
VOLUME ["/var/pinto"]
RUN adduser --system --home /opt/local/pinto --shell /bin/false --disabled-login --group pinto
ENV PINTO_HOME /opt/local/pinto
ENV PINTO_REPOSITORY_ROOT /var/pinto
RUN /opt/local/pinto/bin/pinto init