Skip to content

Instantly share code, notes, and snippets.

@Somsubhra
Somsubhra / KeyUtils.java
Created March 19, 2023 10:13
Utilities to manage RSA Keys in Java
package org.evernet.common.util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
{"logo_location": "http://acs.newpaltz.edu/media/email_icon_gradient.png"}
@Somsubhra
Somsubhra / eval
Last active August 29, 2015 14:20
tsh Evaluation Script
#!/bin/sh
# Script for evaluation of tsh lab
# @author: Somsubhra (@s7a)
#
# Instructions for using this script:
# 1. Place the submission files in a directory called 'submissions'
# at the root of the tsh folder.
# 2. Place this script file at the root of the tsh folder.
# 3. chmod a+x <this_script_file_name>
@Somsubhra
Somsubhra / main.java
Last active December 26, 2015 02:49
Application layer in Java for postgres
/**
* @author Somsubhra
* @author Jigar
*/
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.awt.GridLayout;
@Somsubhra
Somsubhra / feeder.py
Last active December 25, 2015 12:08
SQL Data Feeder
from random import randint
def main():
f = open('script.sql', 'a')
gen = ['m', 'f']
blood = ['A+', 'A-', 'B+', 'B-', 'AB+', 'AB-', 'O+', 'O-']
organs = ['kidney', 'liver', 'heart', 'eye', 'lung', 'pancreas', 'intestine', 'skin', 'joint', 'face']
type = {'eye': 'other', 'heart':'cardiac', 'kidney':'other', 'liver':'other', 'lung':'other', 'pancreas': 'other', 'intestine': 'other', 'skin':'skin', 'joint': 'cartilage', 'face': 'skin'}
for i in range(100):