Skip to content

Instantly share code, notes, and snippets.

View kafaa-dev's full-sized avatar

Kafaa Billahi Syahida kafaa-dev

View GitHub Profile
@scokmen
scokmen / HttpStatusCode.ts
Created April 25, 2017 11:10
Typescript Http Status Codes Enum
"use strict";
/**
* Hypertext Transfer Protocol (HTTP) response status codes.
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
*/
enum HttpStatusCode {
/**
* The server has received the request headers and the client should proceed to send the request body
@kafaa-dev
kafaa-dev / example.js
Last active January 8, 2023 06:24
Generate Random String (JavaScript)
const numbers = '0123456789';
const specials = '`-=[]\\;\',./~!@#$%^&*()_+{}|:"<>?';
const charsLower = 'abcdefghijklmnopqrstuvwxyz';
const charsUpper = charsLower.toUpperCase();
const alphabet = charsLower + charsUpper;
const alphaNumeric = numbers + alphabet;
const all = alphaNumeric + specials;
const random = {
numbers,