Skip to content

Instantly share code, notes, and snippets.

View vied12's full-sized avatar

Edouard vied12

View GitHub Profile
@Yimiprod
Yimiprod / difference.js
Last active April 5, 2024 13:17
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
@sebastien
sebastien / timeout.py
Created July 12, 2012 15:06
Generates a timeout in Retro
import time
from retro import *
class Timeout(Component):
@on(GET="{_:rest}")
def timeout( self, request, _ ):
time.sleep(20)
return request.respond("OK!")
run(Application(Timeout()))
# EOF