Skip to content

Instantly share code, notes, and snippets.

View MaffooBristol's full-sized avatar

Matt Fletcher MaffooBristol

  • Maffcorp Ltd
  • Bristol, England
  • 15:26 (UTC +01:00)
View GitHub Profile
@desandro
desandro / bower-logo.md
Last active December 30, 2021 23:11
Bower logo

In addition to awesome docs #228, Bower deserves a proper logo. See below for sketches. I'm curious if you think any of these are worth me putting more effort into.


Take a look at Yeoman right now.

Screen Shot 2013-02-19 at 4 43 10 PM

The other two entities have awesome logos. Bower's got to represent.

@ShirtlessKirk
ShirtlessKirk / luhn.js
Last active February 12, 2024 05:09
Luhn validation algorithm
/**
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers
* @author ShirtlessKirk. Copyright (c) 2012.
* @license WTFPL (http://www.wtfpl.net/txt/copying)
*/
var luhnChk = (function (arr) {
return function (ccNum) {
var
len = ccNum.length,
bit = 1,
@bnoguchi
bnoguchi / enum-access.js
Created May 3, 2011 09:19
How to access enumValues in mongoose from a Model or Document
var mongoose = require('./index')
, TempSchema = new mongoose.Schema({
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']}
});
var Temp = mongoose.model('Temp', TempSchema);
console.log(Temp.schema.path('salutation').enumValues);
var temp = new Temp();
console.log(temp.schema.path('salutation').enumValues);