Skip to content

Instantly share code, notes, and snippets.

Out sick

Christopher Dosin ChristopherDosin

Out sick
View GitHub Profile
View promise-take-at-least.js
// Creates a new promise that automatically resolves after some timeout:
Promise.delay = function (time) {
return new Promise((resolve, reject) => {
setTimeout(resolve, time)
// Throttle this promise to resolve no faster than the specified time:
Promise.prototype.takeAtLeast = function (time) {
return new Promise((resolve, reject) => {
ChristopherDosin / php_object_to_array.php
Created May 3, 2017 — forked from victorbstan/php_object_to_array.php
recursively cast a PHP object to array
View php_object_to_array.php
This function saved my life.
found on:
by: crvandyke
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?!
$array = json_decode(json_encode($object), true);
View Manager.php
namespace GSS\Component\Push;
use Symfony\Component\DependencyInjection\Container;
class Manager
const GCM_URL = '';
const MOZ_URL = '';
private $db;
View _ide_helper.php
* An helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.0.16 on 2015-03-16.
* @author Barry vd. Heuvel <>
* @see
namespace {
View example.html
// @foreach(array_chunk($posts->all(), 3) as $postSet)
@foreach(array_chunk($posts, 3) as $postSet)
<div class="row"> <!-- this div will surround every three posts -->
@foreach($postSet as $post)
<h3>{{ $post['title'] }}</h3>
View Laravel Ajax.js
jQuery( document ).ready( function( $ ) {
$( '#form-add-setting' ).on( 'submit', function() {
//show some spinner etc to indicate operation in progress
$( this ).prop( 'action' ),
You can’t perform that action at this time.