Skip to content

Instantly share code, notes, and snippets.

@apvinit
apvinit / free_email_provider_domains.js
Created August 22, 2023 11:45
corporate email validator
const free_email_provider_domains = `0.pl
0-00.usa.cc
001.igg.biz
0039.cf
0039.ga
0039.gq
0039.ml
007addict.com
00b2bcr51qv59xst2.cf
00b2bcr51qv59xst2.ga
@apvinit
apvinit / validator.js
Created August 22, 2023 11:41
Email Validator
'use strict';
var tester = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
// Thanks to:
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
// http://thedailywtf.com/Articles/Validating_Email_Addresses.aspx
// http://stackoverflow.com/questions/201323/what-is-the-best-regular-expression-for-validating-email-addresses/201378#201378
// https://en.wikipedia.org/wiki/Email_address The format of an email address is local-part@domain, where the
// local part may be up to 64 octets long and the domain may have a maximum of 255 octets.[4]
exports.validate = function (email) {
module myapp
go 1.18
require (
github.com/PuerkitoBio/goquery v1.8.0
github.com/cavaliergopher/grab/v3 v3.0.1
)
require (
/**
* A calculator program to add, mul, sub and divide two numbers
* Written By: Vinit
* Licenese : Public Domain
*/
#include <iostream>
using namespace std;
int main()
@apvinit
apvinit / convertMillisecondsToDaysHoursMinutesSeconds.js
Created April 9, 2019 08:52
Convert Milliseconds To Days Hours Minutes Seconds
convertMillisecondsToDaysHoursMinutesSeconds(time) {
let days, hours, minutes, seconds;
seconds = Math.floor(time / 1000);
minutes = Math.floor(seconds / 60);
seconds = seconds % 60;
hours = Math.floor(minutes / 60);
minutes = minutes % 60;
days = Math.floor(hours / 24);
hours = hours % 24;
return { days: days, hours: hours, minutes: minutes, seconds: seconds };