Skip to content

Instantly share code, notes, and snippets.

View enahs's full-sized avatar
🥋
乱取り

Shane enahs

🥋
乱取り
  • Oakland, CA
View GitHub Profile
@benbayard
benbayard / creditCardDetector.js
Last active December 19, 2015 23:09
Credit Card Detection!
var isValid = function(ccNumber) {
var reg = new RegExp(/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/);
var match = ccNumber.match(reg);
(match) ? return true : reutnr false;
}
var detectCard = function(ccNumber) {
// remove all the non digits from the CC
@enahs
enahs / markdown.xml
Last active December 19, 2015 20:09 — forked from lg0/markdown.xml
Get Monokai to work right with markdown. paste this into /Users/[your user name here]/Library/Application Support/Sublime Text 2/Packages/Color Scheme - Default/[YOUR_THEME].tmTheme
<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>