Skip to content

Instantly share code, notes, and snippets.

@dahnielson
dahnielson / UUID.php
Last active September 1, 2024 11:34
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@astroanu
astroanu / underscorejs.object.diff.js
Last active February 22, 2017 21:25
Underscore js object difference
var Objcontains = function(oldO, newO) {
var changed = {};
_.each(newO, function(v, i) {
if (oldO[i] != undefined) {
if (Array.isArray(v)) {
changed[i] = _.difference(v, oldO[i]);
} else if (typeof v == 'object') {
changed[i] = Objcontains(oldO[i], v);
} else {
if (oldO != undefined && (oldO[i] == undefined || oldO[i] != v)) {
@twolfson
twolfson / README.md
Last active December 28, 2019 22:38
Node.js ORM evaluation

We are planning on building a Node.js service. Here's our evaluation of the current ORM landscape:

Last updated: May 2 2016