A Pen by Abdus Samad Azad on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const countDownTimer = (totalTime) => { | |
let timeFunc = setInterval(() => { | |
console.log(totalTime); | |
totalTime--; | |
if (totalTime < 0) { | |
clearInterval(timeFunc); | |
console.log("Time's Up!"); | |
} | |
}, 1000) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// function for validating parameter | |
const validateParam = (param2validate) => { | |
if (!param2validate) return false; | |
if (param2validate.length === 0) return false; | |
if (typeof param2validate != 'string') return false; | |
}; | |
const searchPhrase = (phrase, data) => { | |
if (validateParam(phrase) === false){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"short_name": "Abdus", | |
"name": "Abdus", | |
"icon": [ | |
{ | |
"src": "/pwa/img/icons-192.png", | |
"type": "image/png", | |
"sizes": "192x192" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
// script for sending auto invite to people in linkedin | |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
// | |
// Simple script for sending mass invite on linkedin | |
// NOTE: This will send invite to the profiles available in your 'RECOMANDATION' tab | |
// | |
// | |
// | |
// HOW TO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -d ./frames ] | |
then | |
mkdir frames | |
fi | |
ffmpeg -i $1 -r 20 'frames/frame-%03d.jpg' | |
cd frames | |
convert -delay 5 -loop 0 *.jpg $1.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch') | |
const { execSync } = require('child_process') | |
async function getRepoURLs(user) { | |
let gh_data = await fetch(`https://api.github.com/users/${user}/repos`) | |
gh_data = await gh_data.json() | |
return gh_data | |
} | |
async function main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Getting the most frequent element from an array | |
*/ | |
function mode(array = []) { | |
// check if it is an array and have atleast a single element | |
if (!Array.isArray(array)) { | |
throw new Error(`Please provide an array as argument`); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<form action=""> | |
<input | |
type="email" | |
id="email" | |
name="email" | |
placeholder="[email protected]" | |
/> | |
<br /> |
OlderNewer