Skip to content

Instantly share code, notes, and snippets.

View sandeepsuvit's full-sized avatar
🎯
Focusing

Sandeep K Nair sandeepsuvit

🎯
Focusing
View GitHub Profile
@sandeepsuvit
sandeepsuvit / decades-from-year.ts
Created August 17, 2018 07:09
Get decades from year Typescript, JavaScript
// Set of utility functions
export const CommonUtils = {
/**
* Get the decades from year
* =========================================================================
* This utility will get the nearest decades of a year.<br/>
* example: getDecadesFromYear(1965) -> { start: 1960, end: 1970 }
* <br/>
*
* @return {[type]} [description]
@sandeepsuvit
sandeepsuvit / express-boom.d.ts
Created June 27, 2018 18:29
Type definitions for express-boom
/**
* Type definitions for express-boom
* Definitions by: Sandeep K Nair <https://github.com/sandeepsuvit>
* @author: Sandeep K Nair
*/
declare namespace Express {
interface Boom {
// Add boom's properties in here
wrap: (error: Error, statusCode?: number, message?: string) => BoomError;
create: (statusCode: number, message?: string, data?: any) => BoomError;
@sandeepsuvit
sandeepsuvit / cafe-18.svg
Created May 1, 2018 08:31 — forked from clhenrick/cafe-18.svg
Load an SVG from an external page
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sandeepsuvit
sandeepsuvit / cryptojs-example.html
Last active March 14, 2018 17:35 — forked from anonymous/fiddle.html
CryptoJS AES Encryption (source: https://jsfiddle.net/beL4q171/12/)
<p>Message: <span id="message"></span></p>
<p>Encrypted: <span id="encrypted-text"></span></p>
<p>Decrypted text: <span id="decrypted-text"></span></p>