Skip to content

Instantly share code, notes, and snippets.

View oseme-techguy's full-sized avatar
🙂
The Infinite Improbability Drive!

Odigie Oseme oseme-techguy

🙂
The Infinite Improbability Drive!
View GitHub Profile
@oseme-techguy
oseme-techguy / node_crypto.js
Created September 11, 2017 17:25 — forked from rojan/node_crypto.js
Encrypt in nodejs and decrypt in php or vice versa
var crypto = require('crypto');
var key = 'MySecretKey12345';
var iv = '1234567890123456';
var cipher = crypto.createCipheriv('aes-128-cbc', key, iv);
var decipher = crypto.createDecipheriv('aes-128-cbc', key, iv);
var text = 'plain text';
var encrypted = cipher.update(text, 'utf8', 'binary');
encrypted += cipher.final('binary');
hexVal = new Buffer(encrypted, 'binary');
@oseme-techguy
oseme-techguy / java-8-ami.md
Last active September 2, 2017 16:50 — forked from rtfpessoa/java-8-ami.md
[Guide] Install Oracle Java (JDK) 8 on Amazon EC2 Ami
@oseme-techguy
oseme-techguy / es.sh
Created September 1, 2017 07:21 — forked from Globegitter/es.sh
Easy install for elasticsearch on Ubuntu 14.04
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@oseme-techguy
oseme-techguy / nvmnodeinstall.sh
Last active August 31, 2017 14:43 — forked from nimboya/nvmnodeinstall.sh
Install any version of node using nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
# Exit Terminal and Login to use Command
~/.nvm/nvm.sh # this line is not needed at all
nvm install 4.4.5 # Here you can choose your version number
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');