Skip to content

Instantly share code, notes, and snippets.

coding something...

Ashley Clarke clarkeash

coding something...
View GitHub Profile
ziadoz /
Last active Jul 25, 2022
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
cespare / log.go
Created Oct 31, 2012
Golang apache logging
View log.go
type ApacheLogRecord struct {
ip string
time time.Time
method, uri, protocol string
status int
responseBytes int64
elapsedTime time.Duration
sterlingwes / tourney.html
Created Dec 3, 2012
Tournament Bracket Generator (Javascript + CSS, no tables)
View tourney.html
<!DOCTYPE html>
<title>Tournament Bracket Generator</title>
<script src=""></script>
<script src=""></script>
$(document).on('ready', function() {
var knownBrackets = [2,4,8,16,32], // brackets with "perfect" proportions (full fields, no byes)
msurguy /
Last active Feb 8, 2022
Laravel 4 Eloquent Cheat Sheet.


Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

fideloper / Gettable.php
Created Mar 9, 2014
Trait for making protected/private attributes "gettable", leaving "setting" the attributes a matter of business logic to be implemented.
View Gettable.php
trait Gettable {
* Retrieve private attributes.
* Attributes should be protected
* so they cannot be *set* arbitrarily.
* This allows us to *get* them as if they
* were public.