This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class FlashMessages { | |
private $messages = array(); | |
private $now = false; | |
private function __construct() { | |
// Save all messages | |
$this->messages = $_SESSION['flash_messages']; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pager | |
constructor: (collection, attributes) -> | |
@collection = collection | |
@currentPage = attributes.current_page | |
@totalPages = attributes.total_pages | |
@perPage = attributes.per_page | |
@totalEntries = attributes.total_entries | |
@pages = @visiblePageNumbers().map (page) => | |
page: page | |
path: @buildPath page |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// includes bindings for fetching/fetched | |
PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
this.page = 1; | |
}, | |
fetch: function(options) { | |
options || (options = {}); | |
this.trigger("fetching"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dscacheutil -flushcache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
h::html( | |
h::head( | |
h::title('Hi!') | |
), | |
h::body( | |
h::h1('Hello')->id('oi'), | |
h::ul( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DataStore | |
{ | |
public function __call($methodName, $args) { | |
if (preg_match('~^(set|get)([A-Z])(.*)$~', $methodName, $matches)) { | |
$property = strtolower($matches[2]) . $matches[3]; | |
if (!property_exists($this, $property)) { | |
throw new Exception("Error Processing Request",1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DB | |
{ | |
public static function __callStatic($name,$args) | |
{ | |
$q= ""; | |
$query = explode("_",$name); | |
if($query[0] == "get") | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"puts :hi" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CPTooltip.j | |
* Makes a little black rounded-rect gradient tooltip with some text (can have multiple lines with \n) which points at something. | |
* Usage example: | |
* tooltip = [[CPTooltip alloc] initWithText:@"Hello There" atPoint:CPPointMake(100,100)]; | |
* [self addSubview:tooltip]; | |
* | |
* The above will make a tooltip that says "Hello There" which is pointing at this view's 100x100 point. | |
* If the tooltip is too close to its superview's edges, it will adjust itself to maintain readability. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CPLightbox.j | |
* AppKit | |
* | |
* Created by Nicholas Small. | |
* Copyright 2009, 280 North, Inc. | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either |
OlderNewer