Skip to content

Instantly share code, notes, and snippets.

View joelezeu's full-sized avatar

Joel Eze joelezeu

  • Bundle Africa
  • Lagos
View GitHub Profile
@joelezeu
joelezeu / AES-256 encryption and decryption in PHP and C#.md
Created July 22, 2018 15:02
AES-256 encryption and decryption in PHP and C#

AES-256 encryption and decryption in PHP and C#

Update: There is a more secure version available. Details

PHP

<?php

$plaintext = 'My secret message 1234';
@joelezeu
joelezeu / SimpleJSON.java
Created May 15, 2018 16:56 — forked from sheharyarn/SimpleJSON.java
Simple Java Class to convert Lists/Maps to JSON and vice versa
public class SimpleJSON {
public static Object toJSON(Object object) throws JSONException {
if (object instanceof HashMap) {
JSONObject json = new JSONObject();
HashMap map = (HashMap) object;
for (Object key : map.keySet()) {
json.put(key.toString(), toJSON(map.get(key)));
}
return json;
@joelezeu
joelezeu / gist:e6eb610899af93dab0ee40bb9b067730
Created May 9, 2018 09:36 — forked from michalbcz/gist:4170520
java - https url connection - trust any certificate
import java.net.URL;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.KeyManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
@joelezeu
joelezeu / gist:358eee7d76cfd0771149ec067b3df6c1
Created April 13, 2018 07:50
How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu
#Update your package.
$ sudo apt-get update
$ sudo apt-get install apache2
# Open up the main configuration file with your text edit:
ServerName server_domain_or_IP
$ sudo systemctl restart apache2
@joelezeu
joelezeu / installwildfly9Ubuntu1404.sh
Created April 13, 2018 07:20 — forked from Tab3r/installwildfly9Ubuntu1404.sh
Install wildfly 9.x in Ubuntu 14.04 LTS
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
# General utils
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install unzip
sudo apt-get -y install software-properties-common python-software-properties