I hereby claim:
- I am flavioespinoza on github.
- I am flavioespinoza (https://keybase.io/flavioespinoza) on keybase.
- I have a public key ASBKDaHpFFevPWKGy02d_aXuckg7e5X90k8q4fC9wCQ5uAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| {"lastUpload":"2020-02-10T18:33:23.976Z","extensionVersion":"v3.4.3"} |
| {"lastUpload":"2019-10-29T05:50:52.835Z","extensionVersion":"v3.4.3"} |
simple contact form with html5 & css3
A Pen by ssbalakumar on CodePen.
| export type Int = number & { __int__: void } | |
| export const roundToInt = (num: number): Int => Math.round(num) as Int | |
| export const toInt = (value: string): Int => { | |
| return Number.parseInt(value) as Int | |
| } | |
| export const checkIsInt = (num: number): num is Int => num % 1 === 0 |
| if (typeof WebSocket !== 'function') { | |
| // for node.js install ws package | |
| WebSocket = require('ws'); | |
| } | |
| const logger = { | |
| debug: (...arg) => { | |
| // console.log((new Date).toISOString(), 'DEBUG', ...arg) | |
| }, | |
| info: (...arg) => { |
| // 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
| const axios = require('axios'); // promised based requests - like fetch() | |
| function getCoffee() { | |
| return new Promise(resolve => { | |
| setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
| }); | |
| } |
| const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
| const asyncForEach = (array, callback) => { | |
| for (let index = 0; index < array.length; index++) { | |
| await callback(array[index], index, array) | |
| } | |
| } | |
| const start = async () => { | |
| await asyncForEach([1, 2, 3], async (num) => { | |
| await waitFor(50) |
| /* | |
| * Author: Zaggen - 2017 | |
| * version: 0.1 | |
| * github: https://github.com/Zaggen | |
| * Free to use and modify | |
| * */ | |
| const httpProxy = require('http-proxy') | |
| const http = require('http') | |
| const proxy = httpProxy.createProxyServer({}) |