Skip to content

Instantly share code, notes, and snippets.

View ShawnMcCool's full-sized avatar
💭
reinventing the wheel

Shawn McCool ShawnMcCool

💭
reinventing the wheel
View GitHub Profile
@ShawnMcCool
ShawnMcCool / instance-reference-sugar-rfc-0.2.php
Last active August 29, 2015 14:16
PHP RFC: Instance Reference Sugar 0.2
====== PHP RFC: Instance Reference Sugar ======
* Version: 0.2
* Date: 2015-03-09
* Author: Shawn McCool, shawn@heybigname.com
* Status: In Discussion
===== Summary =====
In order to access instance variables and methods, one must use the `$this->` prefix.
@ShawnMcCool
ShawnMcCool / gist:e7fea18b5695f8c499ad
Last active August 29, 2015 14:16
Sailfish Theme Icons
com_android_browser
graphic-avatar-text-back
graphic-background
graphic-bootloader-usb-wakeup
graphic-busyindicator-large-background
graphic-busyindicator-large
graphic-busyindicator-medium-background
graphic-busyindicator-medium
graphic-busyindicator-small
graphic-button
@ShawnMcCool
ShawnMcCool / gist:6dbaae88f2701388c519
Created March 1, 2015 14:39
SailfishOS QML Theme Properties
fontFamilyHeading : string
fontFamily : string
fontSizeTiny : int
fontSizeExtraSmall : int
fontSizeSmall : int
fontSizeMedium : int
fontSizeLarge : int
fontSizeExtraLarge : int
fontSizeHuge : int
itemSizeExtraSmall : float
@ShawnMcCool
ShawnMcCool / gist:c1e7b62e94ab58f6e8d0
Last active August 29, 2015 14:14
Why a closure is called a closure.
// 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
ShawnMcCool / gist:8735217
Created January 31, 2014 16:11
This is an example gist
Beep Boop Beep, I'm a computer.
@ShawnMcCool
ShawnMcCool / BladeParser.php
Created November 26, 2013 20:22
Simple Blade Tag Abstraction.
<?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
ShawnMcCool / gist:7573251
Created November 20, 2013 23:38
This is an example Gist.
This is just an example.. Go make you're own!
@ShawnMcCool
ShawnMcCool / shawn_snippets.sublime-snippet
Created October 18, 2011 11:55
snippets are amazing
<snippet>
<content><![CDATA[
<div class="clearfix">
<label for="$1">$2</label>
<div class="input">
<?=form_input('$1', set_value('$1'))?>
</div>
</div>
]]></content>
<tabTrigger>formtext</tabTrigger>