Skip to content

Instantly share code, notes, and snippets.

View moinism's full-sized avatar
:octocat:
Building

Moin Uddin moinism

:octocat:
Building
View GitHub Profile
@moinism
moinism / scrollProgress.js
Last active June 18, 2021 20:57
Page Scroll Progress With JavaScript
// Read more about it here: https://lab.moin.im/2015/03/18/page-scroll-progress/
function scrollProgress (el, updateFunc, endFunc) {
document.addEventListener('DOMContentLoaded', function() {
var progress = 0,
end = false,
timeStart = null,
timeEnd = null,
height = 0,
elt = null;
@moinism
moinism / Readme.md
Created January 17, 2021 10:21
A simple method to format/mask numbers or any text in JavaScript.

Here's a demo if you wanna play with it:

https://codepen.io/moinism/pen/PoGXrdj?editors=1010

P.S: It's just a simple and lazy implementation, could be made more generalized.

P.P.S: It does not mask the input. It's just a method which can be used anywhere.

@moinism
moinism / sample-push.js
Created January 16, 2021 11:34
A sample push message snippet to use with Electrolytic.app for Electron push notifications.
{
"appKey": "<Your-App-Key>",
"appSecret": "<Your-Secret>",
"target": ["<Token of target user>"],
"payload": "whatever you want to send to that user"
}
@moinism
moinism / README.md
Last active June 11, 2017 16:03
Tiny Slack Web API wrapper for Nodejs

Usage

var Slack = require('./SlackAPI.js')

Use bot or user token for authentication.

var WebAPI = Slack()