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
@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:

n98-magerun.phar config:dump | xmlstarlet sel -t -m '/config/global/events/*/observers/*' -v ./class -o ' ' -v ./method -o ' ' -v ./type -n
@pstuifzand
pstuifzand / menu2.html
Last active August 29, 2015 14:18
Menu without delay
<!doctype html>
<html>
<head>
<style>
* {
padding:0;
margin:0;
box-sizing:border-box;
}
body {
@pstuifzand
pstuifzand / fetch.php
Created April 7, 2015 06:02
Magento database collection speed tests
<?php
include_once('app/Mage.php');
Mage::app('default');
function makeWalker($collection, $modelName) {
///echo $collection->getSelect(). "\n";
return array($collection->getSelect()->query(), $modelName);
}
@pstuifzand
pstuifzand / main.go
Created March 9, 2015 06:50
Git pull tool
package main
import (
"bufio"
"io"
"log"
"net"
"os/exec"
"strings"
)
@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 / NBT.bfft
Created December 14, 2014 11:48
Minecraft NBT bfft (bininspector)
include 'utf8.bfft'
struct tag_byte {
unsigned 8 big byte;
summary 'Byte(', byte, ')';
}
struct tag_short {
unsigned 16 big short;
summary 'Short(', short, ')';
@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