Skip to content

Instantly share code, notes, and snippets.

View parsa-JPM's full-sized avatar
🤔
Thinking

Parsa Mihandoost parsa-JPM

🤔
Thinking
View GitHub Profile
@mahmoud-eskandari
mahmoud-eskandari / validateCard.js
Last active October 16, 2023 08:12
گولنگ و پی اچ پی اعتبار سنجی کارت عابر بانک ایران در جاوا اسکریپت , Iranian bank cards validator function, Javascript Golang php ,تابع تشخیص صحت کارت عابربانک
"use strict";
// By Mahmoud Eskandari @ MIT license
function validateCard(card) {
if (typeof card === 'undefined'
|| card === null
|| card.length !== 16) {
return false;
}
let cardTotal = 0;
for (let i = 0; i < 16; i += 1) {
@McKay1717
McKay1717 / Uniqid
Created August 18, 2014 21:23
PHP uniqid in JAVA
public class Uniqid {
/***
* Copy of uniqid in php http://php.net/manual/fr/function.uniqid.php
* @param prefix
* @param more_entropy
* @return
*/
public String uniqid(String prefix,boolean more_entropy)
{