Skip to content

Instantly share code, notes, and snippets.

@rizkyabdilah
rizkyabdilah / array_intersect.coffee
Created May 1, 2012 13:40
Simple array intersect function in coffeescript
arrayIntersect_ = (arg1, arg2) ->
retVal = []
hashMap = {}
for l in arg1
hashMap[l] = 1
for l in arg2
if hashMap[l] and ((hashMap[l] += 1) == 2)
retVal.push(l)
@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code