Skip to content

Instantly share code, notes, and snippets.

View deodeveloper's full-sized avatar

Bijay deodeveloper

View GitHub Profile
@deodeveloper
deodeveloper / ParseRSAKeys.java
Created March 25, 2020 04:55 — 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;
@deodeveloper
deodeveloper / avro-commandline
Created July 21, 2017 02:40 — forked from yashk/avro-commandline
avro command line tool
source :- http://www.michael-noll.com/blog/2013/03/17/reading-and-writing-avro-files-from-the-command-line/
download tools jar - http://mirror.catn.com/pub/apache/avro/avro-1.7.5/java/avro-tools-1.7.5.jar
add following to ~/.bashrc
alias avro='java -jar /home/yash/software/avro/avro-tools-1.7.5.jar'
now use just as avro command
@deodeveloper
deodeveloper / pom.xml
Created June 22, 2017 19:47 — forked from royrusso/pom.xml
Forking debug process during maven test goal
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14</version>
<configuration>
<debugForkedProcess>true</debugForkedProcess>
</configuration>
</plugin>
@deodeveloper
deodeveloper / bash-cheatsheet.sh
Created June 21, 2016 19:28 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@deodeveloper
deodeveloper / Enhance.js
Created January 25, 2016 07:20 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-0.14.3.min.js"></script>
<script src="https://fb.me/react-dom-0.14.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.0.4/redux.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/4.0.0/react-redux.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
@deodeveloper
deodeveloper / index.jsx
Created January 7, 2016 04:41 — forked from jbinto/index.jsx
Egghead tutorial - Getting Started with Redux - JSBin implementation
/* global ReactRedux, Redux, ReactDOM */
// "Getting Started with Redux" (by Dan Abramov)
// https://egghead.io/series/getting-started-with-redux
// This file on JSBin (by Jesse Buchanan):
// http://jsbin.com/wuwezo/74/edit?js,console,output
////////////////////////////////////////////////
//
@deodeveloper
deodeveloper / ProxyCreator.java
Created November 5, 2015 05:16 — forked from karanmalhi/ProxyCreator.java
Creating a proxy with JavAssist
package mit.proxy;
import java.lang.reflect.Method;
import java.util.ArrayList;
import javassist.util.proxy.MethodHandler;
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.ProxyObject;
public class ProxyCreator {