Skip to content

Instantly share code, notes, and snippets.

View uttesh's full-sized avatar
👨‍💻

uttesh uttesh

👨‍💻
View GitHub Profile
@uttesh
uttesh / SimpleDecrypt.java
Last active June 18, 2020 11:26
Encrypt the data in the NodeJS application and decrypt in the Java application
import java.security.MessageDigest;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class SimpleDecrypt {
public static void main(String[] args) throws Exception {
String encData="67a0fd39e75e37bc0743147d43b9487bde7db1f5ef798da4e570d6595190dd682a9d4491b47ad26c94e11e1e464e8bb1";
String decData = decrypt("somepassword", encData);
@uttesh
uttesh / JSONgen.au3
Last active September 25, 2018 04:43
find data in excel file and return row data as JSON using Autoit script
#cs
JSONgen - JSON generator for AutoIt
Taken as base JSON spec at json.org
#ce
#include-once
Func New_JSON()
Dim $aSelf[1][3]
@uttesh
uttesh / CircularArray.java
Created September 5, 2018 17:42
Java circular array/rotate array, A left rotation operation on an array of size shifts each of the array's elements unit to the left.
public class CircularArray {
public static int[] arr = { 1, 2, 3, 4, 5 };
public static void main(String[] args) {
System.out.println(Arrays.toString(arr));
int rotation = 4;
rotateArray(arr, rotation);
System.out.println(Arrays.toString(arr));
}
@uttesh
uttesh / designmedata
Created January 28, 2018 11:23
design me mobile app data
{
"category": [
{
"name":"Blouse",
"id":"72157666658254479"
},
{
"name":"kids",
"id":"72157689864373452"
},
{
"files": {
"maintenanceFee":"https://drive.google.com/open?id=0B95IcNMgaSfLdUVKcllFa2ZLOFk",
"informationBooklet":"https://drive.google.com/file/d/0B95IcNMgaSfLTXVCc3hvb1FiWVk/view?usp=sharing",
"byeLaws":"https://drive.google.com/open?id=0B95IcNMgaSfLWG5ROTlPelpfSXc"
},
"boardMembers": [
{
"name":"Mr.Kishan Nuthakki",
"email":"president@bgaoa.com",
@uttesh
uttesh / app.ts
Created March 1, 2017 07:15
angular 2 ng2-letter-avatar component
import {
NgModule,
Component
} from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { Ng2LetterAvatar } from "ng2letteravatar/ng2letteravatar";
// import { Ng2LetterAvatar } from "node_modules/ng2letteravatar/ng2letteravatar.js"; provide absolute js file path
@uttesh
uttesh / consolestyle.js
Last active May 16, 2016 18:40
console.log styles
// show big 3d style console text like facebook
console.log('%cStop Looking Here', 'font-size:100px;color:#3D9FAB;text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.3),0 3px 5px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.2),0 20px 20px rgba(0,0,0,.15);');
// blur the console text
var _log = console.log;
console.log = function() {
_log.call(console, '%c' + [].slice.call(arguments).join(' '), 'color:transparent;text-shadow:0 0 2px rgba(0,0,0,.1);');
};
console.log("testing");
@uttesh
uttesh / analyze-code.xml
Created April 28, 2015 12:20
sonar build.xml file
<?xml version="1.0" encoding="UTF-8"?>
<project name="Simple Java Project analyzed with the Sonar Ant Task" default="all" basedir="." xmlns:sonar="antlib:org.sonar.ant">
<!-- ========= Define the main properties of this project ========= -->
<property name="src.dir" value="src" />
<property name="build.dir" value="target" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="extlib.dir" value="ext-lib"/>
<!-- Define the Sonar properties -->
@uttesh
uttesh / POM.xaml
Last active August 28, 2019 22:50
Maven for generating the web service client stub classes.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.uttesh</groupId>
<artifactId>wsclient</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
@uttesh
uttesh / JMeterAPISampleTest.java
Created April 14, 2015 17:41
JMeterAPISampleTest class for the jmeter api implementation class
import java.io.File;
import java.io.FileOutputStream;
import org.apache.jmeter.config.Arguments;
import org.apache.jmeter.config.gui.ArgumentsPanel;
import org.apache.jmeter.control.LoopController;
import org.apache.jmeter.control.gui.LoopControlPanel;
import org.apache.jmeter.control.gui.TestPlanGui;
import org.apache.jmeter.engine.StandardJMeterEngine;
import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui;
import org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy;