Skip to content

Instantly share code, notes, and snippets.

View JWebCoder's full-sized avatar
🦕
Doing

João Moura JWebCoder

🦕
Doing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jwebcoder on github.
  • I am jwebcoder (https://keybase.io/jwebcoder) on keybase.
  • I have a public key ASCH6g_E4IZHOGEdBERRRTh4hl_ZK8IdoDea9PvuM0ltJQo

To claim this, I am signing this object:

@JWebCoder
JWebCoder / README.md
Created May 13, 2020 09:04
Deno web worker example

Deno web worker example

Sample code to create a web worker under Deno

048f7d428a93d91f5ca6ecee4f3a171e515c6ce253cdf2d45b99d4302e37a659b6ec18e1b50152983681e62716eeb8f61902cb939f3e3bf04606216f52a107402a;vesparny
@JWebCoder
JWebCoder / alpha.js
Created June 12, 2014 22:41
Alpha input verification snippet javascript
function validateAlpha(inTxt) {
return /^[a-zA-Z\-_ ’'‘ÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨Ƴąɓçđɗęħįƙłøơşșţțŧųưy̨ƴÁÀÂÄǍĂĀÃÅǺĄÆǼǢƁĆĊĈČÇĎḌĐƊÐÉÈĖÊËĚĔĒĘẸƎƏƐĠĜǦĞĢƔáàâäǎăāãåǻąæǽǣɓćċĉčçďḍđɗðéèėêëěĕēęẹǝəɛġĝǧğģɣĤḤĦIÍÌİÎÏǏĬĪĨĮỊIJĴĶƘĹĻŁĽĿʼNŃN̈ŇÑŅŊÓÒÔÖǑŎŌÕŐỌØǾƠŒĥḥħıíìiîïǐĭīĩįịijĵķƙĸĺļłľŀʼnńn̈ňñņŋóòôöǒŏōõőọøǿơœŔŘŖŚŜŠŞȘṢẞŤŢṬŦÞÚÙÛÜǓŬŪŨŰŮŲỤƯẂẀŴẄǷÝỲŶŸȲỸƳŹŻŽẒŕřŗſśŝšşșṣßťţṭŧþúùûüǔŭūũűůųụưẃẁŵẅƿýỳŷÿȳỹƴźżžẓ]*$/.test(inTxt);
}
@JWebCoder
JWebCoder / throttle.js
Created February 17, 2014 14:33
throttle function
function throttle(fn, threshhold, scope) {
threshhold || (threshhold = 250);
var last,
deferTimer;
return function () {
var context = scope || this;
var now = +new Date,
args = arguments;
if (last && now < last + threshhold) {
@JWebCoder
JWebCoder / debounce.js
Created February 17, 2014 14:31
debounce function
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
clearTimeout(timeout);
timeout = setTimeout(function() {
timeout = null;
if (!immediate) func.apply(context, args);
}, wait);
if (immediate && !timeout) func.apply(context, args);
@JWebCoder
JWebCoder / urlParams.js
Last active December 23, 2015 00:19
Get Url params
function getQueryParams(qs) {
qs = qs.split("+").join(" ");
var params = {}, tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])]
= decodeURIComponent(tokens[2]);
}
@JWebCoder
JWebCoder / email.js
Created August 30, 2013 13:22
Email verification snippet, javascript
var result = emailVerification("insert email here");
function emailVerification(email){
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
return false;
} else {
return true;
}
}