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 | |
$past_months_total = DB::query(Database::SELECT, 'SELECT COUNT(*) as uploaded FROM `photos` | |
WHERE `photos`.`created` | |
BETWEEN DATE_SUB(NOW(), INTERVAL 30 DAY) AND NOW() | |
AND `photos`.`user_id` = '. $this->user->id)->execute(); |
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
sudo node run.js | |
5 Nov 23:22:15 - socket.io ready - accepting connections | |
Error: ECONNREFUSED, Connection refused | |
at Stream._onConnect (net.js:687:18) | |
at IOWatcher.onWritable [as callback] (net.js:284:12) | |
at node.js:616:9 |
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.'); | |
class Model_User extends Model_Auth_User { | |
protected $_has_many = array( | |
'user_tokens' => array('model' => 'user_token'), | |
'roles' => array('model' => 'role', 'through' => 'roles_users'), | |
); | |
protected $_rules = 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
{ | |
"requirements" : [ | |
"php" : [ | |
"PHP5", | |
"Working With Databases", | |
"WordPress" | |
], | |
"javascript" : [ | |
"jQuery" |
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
Route::set('manage', 'manage/(<resource_id>/(/<controller>(/<action>(/<id>))))') | |
->defaults(array( | |
'controller' => 'tenants', | |
'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
ABOUT US: | |
http://risermedia.com | |
We’re a full service graphic design agency with high profile clients (ABC, National Geographic, NBC, ABC Family, Warner Bros., TV Guide and more). We’re young, hip, and super passionate about our work. | |
We absolutely despise micro-management. We want people like us who love what they do and do it well. We'll let Basecamp manage the little details so you can turn out stellar code in peace - without some old-school jerk barking over your shoulder! | |
We’re located in American Fork, so anywhere in happy valley or SLC is close enough to commute. |
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
----------------------------------------- | |
ABOUT US (RISERMEDIA.COM): | |
----------------------------------------- | |
We’re a full service graphic design agency with high profile clients (ABC, National Geographic, NBC, ABC Family, Warner Bros., TV Guide and more). We’re young, hip, and super passionate about our work. | |
We absolutely despise micro-management. We want people like us who love what they do and do it well. We'll let Basecamp manage the little details so you can turn out stellar code in peace - without some old-school jerk barking over your shoulder! | |
We’re located in American Fork, so anywhere in happy valley or SLC is close enough to commute (we do not work remotely). | |
----------------------------------------- |
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
// SCSS | |
a{ | |
color: #ff0000; | |
&:hover{ | |
color: #660000; | |
} | |
} |
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
input{ | |
&.submit{ | |
} | |
&.text{ | |
} | |
&.radio{ | |
} | |
} |
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
// Returns "?sort=title&limit=10" combined with any existing GET values | |
$query = URL::query(array('sort' => 'title', 'limit' => 10)); | |
public static function query(array $params = NULL) | |
{ | |
if ($params === NULL) | |
{ | |
// Use only the current parameters | |
$params = $_GET; |