Skip to content

Instantly share code, notes, and snippets.

View paligiannis's full-sized avatar

Marios Paligiannis paligiannis

View GitHub Profile
@tdoumas
tdoumas / afm-validator.js
Created December 9, 2013 16:44
Αλγόριθμος ορθότητας ΑΦΜ Greek Tax Registration Number Validation (AFM)
// Greek Tax Registration Number Validation (AFM)
// Αλγόριθμος ορθότητας ΑΦΜ
function validateAFM(afm) {
if (!afm.match(/^\d{9}$/) || afm == '000000000')
return false;
var m = 1, sum = 0;
for (var i = 7; i >= 0; i--) {
m *= 2;
sum += afm.charAt(i) * m;
@chrisjhoughton
chrisjhoughton / wait-el.js
Last active October 6, 2023 09:46
Wait for an element to exist on the page with jQuery
var waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
callback();
} else {
setTimeout(function() {
waitForEl(selector, callback);
}, 100);
}
};
@lirenyeo
lirenyeo / bs4-cheatsheet.md
Last active May 30, 2022 01:40
Bootstrap 4 Utilities Cheatsheet

Bootstrap 4 Utilities Cheatsheet

Media Queries

1. up

Bootstrap 4 Mixins Compiled into
@include media-breakpoint-up(xs) @media (min-width: 0px)
@include media-breakpoint-up(sm) @media (min-width: 576px)
@include media-breakpoint-up(md) @media (min-width: 768px)