Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
JeffreyWay / gist:1374162
Created November 17, 2011 19:22
Prompt IE6 for Chrome Frame Install
<!--[if lt IE 7 ]>
<script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<script>CFInstall.check();</script>
<![endif]-->
@JeffreyWay
JeffreyWay / DogsController.php
Last active December 11, 2015 20:08
Testable Laravel.
<?php
class DogsController extends BaseController {
protected $db;
// Let the db-layer be injected. Don't worry...
// Laravel will automatically inject the dependencies for you.
function __construct(DogInterface $db) {
$this->db = $db;
}
@ziadoz
ziadoz / eloquent.php
Last active November 28, 2018 14:40
Laravel 4 Eloquent ORM Standalone (Observers, Query Logging).
<?php
class Post
{
protected $table = 'posts';
/**
* You can define your own custom boot method.
*
* @return void
**/
@bobatkey
bobatkey / STLC.markdown
Last active December 18, 2020 15:59
Three typing rules and the constructive truth

This is a type constructor

class FunctionType:
    def __init__(self, tyA, tyB):
        self.tyA = tyA
        self.tyB = tyB

    def __eq__(self, other):
 return self.tyA == other.tyA and self.tyB == other.tyB