Skip to content

Instantly share code, notes, and snippets.

@bennadel
bennadel / angularjs-post-bootstrap.htm
Created November 4, 2013 13:27
Loading AngularJS Components After Your Application Has Been Bootstrapped
<!doctype html>
<html ng-app="Demo">
<head>
<meta charset="utf-8" />
<title>
Loading AngularJS Components After Application Bootstrap
</title>
<style type="text/css">
@vyspiansky
vyspiansky / build-tree.php
Last active October 2, 2023 14:36
PHP: convert object / array to tree structure
<?php
/**
* The below functions take the single level array of items as an argument
* and turn it into a multidimensional array structure (tree),
* where each item has an array of sub-items.
*
* Each item should have at least an `id` and `parent_id`,
* where the `parent_id` is `0` if it's top level.
*
* Source: http://goo.gl/p2GybZ
@mmthomas
mmthomas / ServiceKernel.js
Created November 16, 2012 17:12
A simple JavaScript dependency injection container
/*
*
* A simple JavaScript dependency injection container
* By Monroe Thomas http://blog.coolmuse.com
*
* http://blog.coolmuse.com/2012/11/11/a-simple-javascript-dependency-injection-container/
*
* MIT Licensed.
*
* Unit tests can be found at https://gist.github.com/4270523
@mnapoli
mnapoli / reference.yml
Last active January 12, 2023 00:08
Doctrine YAML configuration reference
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance