This file contains 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
routeToRegex = (route) -> | |
'/' + route.replace('/', '\/') + '/g' | |
dispatch = (@route, @response) -> | |
@pattern = routeToRegex route | |
dispatch '/api/:something', -> | |
'Hello world' |
This file contains 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 defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Controller default view loading for Kostache! | |
* | |
* To get your controllers guessing what views to load simply | |
* place this file into your "classes" directory in your application. | |
*/ | |
class Controller extends Kohana_Controller { | |
This file contains 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 defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* CRUDDDDD | |
*/ | |
class Controller_Crud extends Controller { | |
/** | |
* Show a list of items | |
* |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<title>Prioritise</title> | |
<style> | |
.selected{font-weight:bold;} | |
</style> | |
</head> | |
<body> | |
<h1>Prioritise</h1> |
This file contains 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 | |
/** | |
* Information on getting started with ORM | |
* | |
* [!!] You must initialise ORM in your bootstrap | |
* | |
* @see http://kohanaframework.org/guide/tutorials.orm | |
* @see http://kohanaframework.org/guide/security.validation | |
* @see http://kohanaframework.org/guide/security.database | |
* @see https://github.com/kohana/orm/blob/3.0.8/classes/kohana/orm.php |
This file contains 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
/* | |
Book Owners Table | |
*/ | |
CREATE TABLE IF NOT EXISTS `book_owners` ( | |
`book_id` int(10) NOT NULL, | |
`owner_id` int(10) NOT NULL, | |
KEY `book` (`book_id`), | |
KEY `owner` (`owner_id`), | |
CONSTRAINT `book` FOREIGN KEY (`book_id`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `owner` FOREIGN KEY (`owner_id`) REFERENCES `owners` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
This file contains 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 Plugin | |
constructor: (@element, @settings) -> | |
console.log @element | |
@element.bind | |
'click' : @started | |
'blur' : @stopped | |
started: (e) => @settings.start.call @element, e | |
stopped: (e) => @settings.stop.call @element, e |
This file contains 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
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<meta name="google-site-verification" content="CIkr4axborR-tfqw_KtW0SyDi7wbgrYUJRMZ85oNQIM" /> | |
<meta name="description" content="Mayfield Construction the trusted local builders of Gravesend and Northfleet We take on a lot of contracts, please call 07739469915 and ask for Ed." /> | |
<meta name="author" content="Edward Smith - mayfieldconstruction.co.uk" /> | |
<meta name="robots" content="all, index, follow" /> |
This file contains 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
<div class="calendar"> | |
<div class="month"> | |
<h3>January</h3> | |
<table> | |
<tr> | |
<th>M</th> | |
<th>T</th> | |
<th>W</th> | |
<th>T</th> | |
<th>F</th> |
This file contains 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 | |
Route::set('admin', 'admin(/<controller>(/<action>(/<id>)))') | |
->defaults( | |
array( | |
'directory' => 'admin', | |
'controller' => 'mycontroller' | |
) | |
); |