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
function sexy_json() | |
{ | |
$regions = function(){ | |
$array = array(); | |
$regions = new Pod('regions'); | |
$regions->findRecords('name ASC'); | |
while($regions->fetchRecord()) | |
{ | |
array_push($array, $regions->get_field('name')); |
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 | |
$array = array( | |
'name' => 'Kenneth' | |
); | |
$array = (Object)$array; | |
echo $array->name; |
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
[myapp.com/login] | |
[myapp.com/client] // Same application as /login | |
[myapp.com/admin] // Separate application |
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 | |
try | |
{ | |
$user = ORM::factory('user'); | |
$user->name = 'Merrick'; | |
$user->save(); | |
$profile = ORM::factory('profile'); | |
$profile->name = 'What up.'; |
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 | |
public function create_user_and_landlord($values) | |
{ | |
$this->_db->begin(); | |
$errors = NULL; | |
try | |
{ | |
$this->values($_POST, $this->form_fields()); |
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 | |
/** | |
* Try creating the user, commit a transaction. | |
* | |
* @author Merrick Christensen | |
*/ | |
try | |
{ | |
$user = ORM::factory('user') | |
->create_user($_POST, array( |
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
SlideShow.Controls = new Class({ | |
Extends: SlideShow, | |
options: { | |
controlsSelector: '', | |
controlSyntax: 'li a[href=#]' | |
}, | |
setupSlides: function(){ |
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('help', 'help(/<id>)', | |
array( | |
'path' => '[a-zA-Z0-9_/]+', | |
)) | |
->defaults(array( | |
'controller' => 'help', | |
'action' => 'index', | |
)); |
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
@mixin wallpaper($image, $block:false){ | |
width: image-width($image); | |
height: image-height($image); | |
background: image-url($image); | |
@if $block != false{ | |
display: block; | |
} | |
} |
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
$.fn.bubble = function(options){ | |
/* Initialize base variables */ | |
var settings = { | |
offset : { | |
left: 0, | |
top: 0 | |
}, | |
action: 'click' // Event to toggle bubble | |
}, |