Skip to content

Instantly share code, notes, and snippets.

View JeffreyBodin's full-sized avatar
🍞

Jeffrey Bodin JeffreyBodin

🍞
View GitHub Profile
@JeffreyBodin
JeffreyBodin / My first ruby code academy project 12_13_16.rb
Last active December 14, 2016 05:31
My first ruby code academy project 12_13_16
print "Enter First Name:"
first_name = gets.chomp
first_name.capitalize!
print "Enter Last Name:"
last_name = gets.chomp
last_name.capitalize!
print "Enter City:"
city_name = gets.chomp
mod10check = function(cc) {
return $A(cc).reverse().map(Number).inject(0, function(s, d, i) {
return s + (i % 2 == 1 ? (d == 9 ? 9 : (d * 2) % 9) : d);
}) % 10 == 0;
};
['49927398716','49927398717','1234567812345678','1234567812345670'].each(function(i){alert(mod10check(i))});
<script id="jsbin-javascript">
var LuhnCheck = (function()
{
var luhnArr = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9];
mod10check = function(cc) {
return $A(cc).reverse().map(Number).inject(0, function(s, d, i) {
return s + (i % 2 == 1 ? (d == 9 ? 9 : (d * 2) % 9) : d);
}) % 10 == 0;
};
['49927398716','49927398717','1234567812345678','1234567812345670'].each(function(i){alert(mod10check(i))});
<script id="jsbin-javascript">
var LuhnCheck = (function()
{
var luhnArr = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9];
@JeffreyBodin
JeffreyBodin / Notes_Git Commit Guidelines.txt
Created October 13, 2018 19:23
Notes_Git Commit Guidelines
// Notes:
/*Git Commit Guidelines
- Commit Message Format
- Each commit message consists of a header, a body and a footer.
- The header has a special format that includes a type, a scope and a subject:
- The header is mandatory. Scope of the header is optional.
<type>(<scope>): <subject> // <-- Header
<BLANK LINE> // <-- Body
<body> // <-- Body
<BLANK LINE> // <-- Body
@JeffreyBodin
JeffreyBodin / Notes_.d.ts.txt
Created October 13, 2018 19:24
Notes_.d.ts
// https://stackoverflow.com/questions/41292559/could-not-find-a-declaration-file-for-module-module-name-path-to-module-nam
// declare module '*'; The benefit (and downside) of this is that you can import absolutely anything and TS will compile.
//declare module 'tmi.js';
//declare module 'tmi.js'
@JeffreyBodin
JeffreyBodin / new.reddit_backgroundColorFix.js
Last active August 20, 2020 04:05
// New Reddit's Background => Old Reddit's Background
// backgroundColorFix
// New Reddit's Background => Old Reddit's Background
//Regards New Reddit's Following Property:
--newCommunityTheme-body: #ffffff;
//Replace property's value (ie key/value pair schema):
#ffffff
[{"actor":"JeffreyBodin","org":"r-trump","created_at":1584402031978,"action":"organization_default_label.create"},{"actor":"JeffreyBodin","org":"r-trump","created_at":1584402032463,"action":"org.create"},{"actor":"JeffreyBodin","org":"r-trump","created_at":1584402693040,"action":"members_can_delete_repos.disable","user":"JeffreyBodin"},{"actor":"JeffreyBodin","org":"r-trump","created_at":1584402031838,"action":"organization_default_label.create"},{"actor":"JeffreyBodin","org":"r-trump","created_at":1584402031930,"action":"organization_default_label.create"},{"actor":"JeffreyBodin","org":"r-trump","created_at":1584403327637,"action":"profile_picture.update"},{"actor":"JeffreyBodin","org":"r-trump","created_at":1584402031700,"action":"organization_default_label.create"},{"actor":"JeffreyBodin","org":"r-trump","created_at":1584402703766,"action":"repository_visibility_change.disable","user":"JeffreyBodin"},{"actor":"JeffreyBodin","org":"r-trump","created_at":1584402031651,"action":"organization_default_label.cre
1000000 === "1,000,000"
// 2020-09-28
// Javascript - Reference
// img archive: https://i.imgur.com/hOLhbmw.png
// License:
// https://creativecommons.org/licenses/by-sa/4.0/
// https://stackoverflow.com/a/30060894
Use:
var arr = [1, 2, 3, 4];

Gay Frogs: A Deep Dive


v

2020-10-14

// 2020-10-14
// Gay Frogs: A Deep Dive