Skip to content

Instantly share code, notes, and snippets.

View lucasbento's full-sized avatar
:shipit:

Lucas Bento lucasbento

:shipit:
View GitHub Profile
@lucasbento
lucasbento / getDay.php
Created March 19, 2016 12:52
Get start and end of given timestamp
$timestamp = 1458356400;
$startOfDay = strtotime('midnight', $timestamp);
$endOfDay = strtotime('tomorrow', strtotime('midnight', $timestamp)) - 1;
@lucasbento
lucasbento / config.js
Last active March 17, 2016 10:49
AngularJS 1.4.x workaround to work with CakePHP 2.x REST API.
(function() {
'use strict';
angular
.module('app')
.config(config);
config.$inject = ['$httpProvider'];
/** @ngInject */