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 / css_inline_transformer.js
Created July 31, 2020 09:42 — forked from nirvanatikku/css_inline_transformer.js
JavaScript CSS Inline Style Transformer (convert CSS + HTML into HTML with inline styles)
/**
* CSS Inline Transform v0.1
* http://tikku.com/css-inline-transformer-simplified
*
* Copyright 2010-2012, Nirvana Tikku
* Dual licensed under the MIT or GPL Version 2 licenses.
* https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
*
* This tool leverages the jQuery library.
*
@sandeepsuvit
sandeepsuvit / ParseRSAKeys.java
Created July 8, 2020 10:01 — forked from destan/ParseRSAKeys.java
Parse RSA public and private key pair from string in Java
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
@sandeepsuvit
sandeepsuvit / app.module.ts
Created May 13, 2020 14:28 — forked from adriano-di-giovanni/app.module.ts
Multi-tenant Mongoose module for Nest
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TenancyModule } from '@app/tenancy';
import { OrderModule } from './order';
import { PaymentModule } from './payment';
import { Request } from 'express';
@Module({
imports: [TenancyModule.forRoot({
@sandeepsuvit
sandeepsuvit / interfaces.mongo-options.interface.ts
Created January 13, 2020 08:23 — forked from AliYusuf95/interfaces.mongo-options.interface.ts
MongoDB driver module for NestJS with dynamic mongo connection creation per request and handling open connections
import { ModuleMetadata, Type } from '@nestjs/common/interfaces'
/**
* Options that ultimately need to be provided to create a MongoDB connection
*/
export interface MongoModuleOptions {
connectionName?: string
uri: string
dbName: string
clientOptions?: any
@sandeepsuvit
sandeepsuvit / clipboard_image_post_js.html
Created February 21, 2019 17:41 — forked from kidatti/clipboard_image_post_js.html
Upload clipboard image to server (HTML5 / JavaScript / AJAX)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
</head>
<body>
<script>
@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>