Skip to content

Instantly share code, notes, and snippets.

View duffy-walsh's full-sized avatar

Dee Dub duffy-walsh

  • MongoDB
  • Denver
  • 08:02 (UTC -06:00)
View GitHub Profile

Luhn Checksum

Implement a Ruby program that outputs the validity of a number by applying the Luhn Checksum.

http://en.wikipedia.org/wiki/Luhn_algorithm

Please treat this as you would any other task you'd encounter during your daily work. This will show us how currently code, and not how you coded 6, 12 or 18 months ago. Your code should also be suitably tested. Also, please do not feel that you need to spend a great deal of time working on a solution.

There are many solutions and code snippets online to do a Luhn Checksum. Please resist using those.

@grncdr
grncdr / data.csv
Created June 17, 2015 22:29
Demo of importing a CSV file into a Contentful space
first name last name age
Stephen Sugden 31
Tom Reznik 29
Justin Thomas 30
@der-On
der-On / rivets_formatters.js
Created December 19, 2014 16:08
Rivets.js general purpose formatters
rivets.formatters['!'] = function(value)
{
return !value;
};
rivets.formatters.eq = function(value, args)
{
return value === args;
};
rivets.formatters.neq = function(value, args)
{
@conraddecker
conraddecker / gist:4224889
Created December 6, 2012 14:40
eZPublish Custom Edit Handler
<?php
class CustomEditHandler extends eZContentObjectEditHandler
{
function __construct()
{ }
function fetchInput( &$http, &$module, &$class, &$object, &$version, &$contentObjectAttributes, $editVersion, $editLanguage, $fromLanguage )
{ }
static function storeActionList()