Skip to content

Instantly share code, notes, and snippets.

@indrajeet0510
indrajeet0510 / Instructions.txt
Created February 12, 2017 10:27
How to generated BKS Keystore File for android using JDK and OpenSSL by tweaking java settings
keytool -importcert -v -trustcacerts -file "C:\Users\Indra\Documents\myapp.com.cer" -alias IntermediateCA -keystore "C:\Users\Indra\Documents\appKeyStore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "C:\Users\Indra\Downloads\bcprov-jdk15on-154.jar" -storetype BKS -storepass StorePass123
keytool -list -keystore "C:\Users\Indra\Documents\appKeyStore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "C:\Users\Indra\Downloads\bcprov-jdk15on-154.jar" -storetype BKS -storepass "StorePass123"
--------------------------------------------------------------------------------------------------------------------------------------------------------
openssl pkcs12 -export -in "/home/myapp/myapp_cert_2016/ssl_certificate.crt" -inkey "/home/myapp/myapp_cert_2016/domainname.key" -certfile "/home/myapp/myapp_cert_2016/ssl_certificate.crt" -out testkeystore.p12
Export password : exportpass123
@indrajeet0510
indrajeet0510 / flat.array.js
Created September 20, 2016 10:26
Flat Array
function parseElem(elem){
if(typeof elem == 'number'){
return [elem];
}
var result = [];
for(var count =0; count < elem.length; count++){
result = result.concat(parseElem(elem[count]));
}
return result;
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="container"></div>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="container"></div>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="container"></div>
<script id="jsbin-javascript">