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
config.vm.share_folder("api", "/vagrant/api", "./api", :owner => "www-data", :group => "www-data", :extra => "dmode=775,fmode=644") |
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 | |
/** | |
* OAuth 2.0 Password grant | |
* | |
* @package php-loep/oauth2-server | |
* @author Alex Bilbie <hello@alexbilbie.com> | |
* @copyright Copyright (c) 2013 PHP League of Extraordinary Packages | |
* @license http://mit-license.org/ | |
* @link http://github.com/php-loep/oauth2-server | |
*/ |
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
App::before(function($request) | |
{ | |
header('Access-Control-Allow-Methods: GET, POST, PUT, OPTIONS'); | |
header('Access-Control-Allow-Origin: *'); | |
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization"); | |
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { | |
exit; | |
} |
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
'use strict' | |
define([], function () { | |
function getCurrentUser() { | |
function loader($q, $http, config) { | |
var defer = $q.defer(); | |
$http.get(config.api + '/me', { authentication:true }).then(function(user) { | |
defer.resolve(user); |
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
public function findByVendorIdByMonth($vendor, $id) | |
{ | |
$data = $this->select(DB::raw("DATE_FORMAT(date, '%Y-%m-01 00:00:00') as date, SUM(views) as views, SUM(uniques) as uniques, SUM(inquiries) as inquiries")) | |
->groupBy(DB::raw("YEAR(date), MONTH(date)")) | |
->whereBetween('date', [date('Y-m-d 00:00:00', strtotime('-1 year')), date('Y-m-d 00:00:00', strtotime('today'))]) | |
->where('vendor_type', $vendor) | |
->where('vendor_id', $id)->get(); | |
$monthly = ['totals' => [ | |
'uniques' => 0, |
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
# ************************************************************ | |
# Sequel Pro SQL dump | |
# Version 4096 | |
# | |
# http://www.sequelpro.com/ | |
# http://code.google.com/p/sequel-pro/ | |
# | |
# Host: 8af2809e293652e222219d91ac59e78895a811b2.rackspaceclouddb.com (MySQL 5.1.72-2) | |
# Database: master | |
# Generation Time: 2014-04-05 13:37:32 +0000 |
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
var gulp = require('child_process').spawn('gulp', [], {stdio:'inherit'}) |
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
App::before(function($request) | |
{ | |
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS'); | |
header('Access-Control-Allow-Origin: *'); | |
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization"); | |
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { | |
exit; | |
} |
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
'use strict' | |
module.exports = function($window) { | |
return { | |
restrict: 'E', | |
template: "<canvas id='space' width='{{ width }}' height='{{ height }}'></canvas>", | |
replace: true, | |
link: function($scope, element, attr) { | |
var ctx = element[0].getContext('2d'), | |
dist, |
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
'use strict' | |
module.exports = function() { | |
if ( ! watchers) var watchers = []; | |
var watchResolution = (function watchResolution() { | |
var devicePixelRatio = window.devicePixelRatio; | |
setTimeout(function() { |
OlderNewer