Skip to content

Instantly share code, notes, and snippets.

old and eccentric

Shawn McCool ShawnMcCool

old and eccentric
View GitHub Profile
ShawnMcCool / gist:c1e7b62e94ab58f6e8d0
Last active Aug 29, 2015
Why a closure is called a closure.
View gist:c1e7b62e94ab58f6e8d0
// An anonymous function written in lambda syntax:
x => x + 1
val func = x => x + 1
func(3) // returns 4
// In this case, the lambda `x => x + 1` relies on NO external data.
// It's fundamentally complete. X is provided as an argument to the function.
ShawnMcCool / gist:8735217
Created Jan 31, 2014
This is an example gist
View gist:8735217
Beep Boop Beep, I'm a computer.
ShawnMcCool / BladeParser.php
Created Nov 26, 2013
Simple Blade Tag Abstraction.
View BladeParser.php
<?php namespace Sterling\BladeParsing;
class BladeParser
protected $tags = [];
public function parse($view)
foreach ($this->tags as $tag) {
if ($tag->getMatchCount($view) > 0) $view = $tag->transform($view);
ShawnMcCool / gist:7573251
Created Nov 20, 2013
This is an example Gist.
View gist:7573251
This is just an example.. Go make you're own!
View shawn_snippets.sublime-snippet
<div class="clearfix">
<label for="$1">$2</label>
<div class="input">
<?=form_input('$1', set_value('$1'))?>
You can’t perform that action at this time.