Skip to content

Instantly share code, notes, and snippets.

@punchouty
punchouty / EncryptDecryptFile
Last active March 5, 2024 16:35
Cryptography with AES Algorrithm
package com.punchouty.ed;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import javax.crypto.Cipher;
@punchouty
punchouty / KeyWriter
Created September 19, 2014 16:42
RSA key to file
package com.punchouty.ed;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
@punchouty
punchouty / KeyReader
Created September 19, 2014 16:44
Read RSA key from file
package com.punchouty.ed;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
@punchouty
punchouty / pluralsight.js
Created May 1, 2016 17:46
Pluralsight Video Download
//Login to pluralsight in chrome and Open a course you want to download
//Example - https://app.pluralsight.com/library/courses/aws-automating-cloudformation/table-of-contents
//Click on "Start" or "Resume Course" Button
//chapter listing
var list = document.getElementsByTagName("section");
var counter=0;
for (var i=0; i<list.length; i++) {
if ( list[i].className.match(/\bmodule\b/) ) {
var header_text = list[i].getElementsByTagName("h2")[0].innerText;
var ul = list[i].getElementsByClassName('clips');
@punchouty
punchouty / sample.js
Created September 9, 2016 16:04
Sample Controller
(function() {
'use strict';
angular
.module('app')
.controller('Someontroller', SomeController);
SomeController.$inject = ['someservice'];
function AdminController(logger) {
@punchouty
punchouty / Python.md
Last active September 17, 2019 18:17

Conda - Manage Enviornment

  • conda env list # list all enviornment
  • conda info --env
  • conda create --name py2 python=2.7 # Create new enviornment
  • conda create -n tfdeeplearning python=3.5
  • conda create -f tfdl_env.yml # create new enviornment from file
  • conda activate base # activate base python
  • conda deactivate # deactivate base python
  • conda activate py2
@punchouty
punchouty / crossref.txt
Last active August 1, 2018 13:12
Cross Ref
xz -d crossrefworks.json.xz
mongod --dbpath /Volumes/Seagate/data
mongoimport --db thomson --collection works --file /Volumes/Seagate/crossrefworks.json
mongoexport --db crossref --collection names --out /Volumes/Seagate/names.json
/Volumes/Seagate/elasticsearch-5.5.0/bin/elasticsearch
https://www.quora.com/What-is-a-good-algorithm-service-for-fuzzy-matching-of-peoples-names-for-de-duplication
http://ntz-develop.blogspot.com/2011/03/phonetic-algorithms.html
https://commons.apache.org/proper/commons-text/javadocs/api-release/index.html
https://www.ibm.com/support/knowledgecenter/en/SSEV5M_4.2.0/com.ibm.iis.gnm.install.doc/topics/gnr_tsk_installingconfiguring.html
@punchouty
punchouty / weka.txt
Last active August 9, 2018 15:31
Machine Learning Video
Basic Introduction
https://youtu.be/Er2bZ_GhDt8
Run - java -jar weka.jar
https://youtu.be/0bdlfW7-I-o
https://youtu.be/QtNYArb0Tkc
https://youtu.be/VHwXGg2-Kas
https://youtu.be/yQofi_4Z-lw
http://ntz-develop.blogspot.com/2011/03/phonetic-algorithms.html
@punchouty
punchouty / aws-basics.md
Last active September 7, 2018 08:22
Basics of AWS

Setup Web Server

  1. ssh ec2-user@34.201.105.246 -i learn-ec2-keypair.pem
  2. sudo su
  3. yum update -y
  4. yum install httpd -y
  5. service httpd restart
  6. chkconfig httpd on # start on restart
  7. service httpd status
  8. cd /var/www/html
  9. nano index.html