Skip to content

Instantly share code, notes, and snippets.

Boban Stojanovski boban984

Block or report user

Report or block boban984

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
boban984 /
Created Dec 7, 2016 — forked from chip/
Douglas Crockford - Create Object Recipe (2014)

Douglas Crockford showed a slide showing how he creates JavaScript objects in 2014.

He no longer uses Object.create(), avoids 'this' and doesn't even care about memory reduction by using prototypes. (skip ahead to 35 mins for relevant section)

Here is the pattern described on the slide:

function constructor(spec) {
boban984 / ApplicationBuilderExtensions.cs
Last active May 25, 2016 core rc2, serve node_modules folder
View ApplicationBuilderExtensions.cs
using Microsoft.Extensions.PlatformAbstractions;
using System.IO;
using Microsoft.Extensions.FileProviders;
using Microsoft.AspNetCore.Hosting;
namespace Microsoft.AspNetCore.Builder
public static class ApplicationBuilderExtensions
public static IApplicationBuilder UseNodeModules(
boban984 / jqueryevents
Created Mar 16, 2014
jQuery get Events
View jqueryevents
function getEvents(sel) {
return $(sel).toArray().reduce(function(acc, el) {
var events = $._data(el, 'events');
if (events) acc.push(events);
return acc;
}, []);
function calculateEvents(acc, obj) {
for (key in obj) {
You can’t perform that action at this time.