Skip to content

Instantly share code, notes, and snippets.

@aimtiaz11
aimtiaz11 / ext_table.sql
Last active June 23, 2017 04:55
Using External Tables in Oracle APEX
DROP TABLE ADT_SOURCES_EXT;
create table ADT_SOURCES_EXT
(
FIRST_NAME VARCHAR2(30),
LAST_NAME VARCHAR2(30),
MIDDLE_INITIAL VARCHAR2(1),
POSTAL_CODE NUMBER,
LATITUDE NUMBER,
@aimtiaz11
aimtiaz11 / instructions.md
Last active July 22, 2018 01:46
Converting .pfx key to Java Keystore

Converting .pfx key to Java Keystore

Ensure Java and Keytool is setup in the machine prior to running it.

keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS
@aimtiaz11
aimtiaz11 / readme.md
Last active March 1, 2017 02:21
Using Curl

Using Curl

Only Get Status Code of API Call

curl -s -o /dev/null -I -w "%{http_code}" http://example:8009/contextPath/
@aimtiaz11
aimtiaz11 / instructions.md
Last active October 19, 2015 00:17
Find JAVA_HOME in Mac OSX

Changing/Switching Java Versions in Mac OSX

Often you may need to switch to different version of Java if you have multiple Java installed in your Mac.

Find where Java 7 is installed:

AIs-MBP:~ ai$ /usr/libexec/java_home -v 1.7 

/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
@aimtiaz11
aimtiaz11 / readme.md
Last active August 29, 2015 14:19
Maven - Install Maven generated WAR file to Tomcat 7/8

How to Install WAR file to Tomcat

  1. Update ~/.m2/settings.xml
<settings>
 <servers>
  <server>
   <id>dev-tomcat</id>
   <username>tomcat</username>
 password
@aimtiaz11
aimtiaz11 / Instructions.md
Last active May 25, 2017 00:31
NodeJS create fake user data using Faker

NodeJS create fake user data using Faker

Create server.js file as below:

Install Faker: npm install faker

Content of server.js:

var express = require('express');
@aimtiaz11
aimtiaz11 / Instructions.md
Created May 5, 2015 07:15
Grunt - Setting up Grunt in your project

Setting up Grunt in your project

  1. Run npm init in your project root folder
  2. Setup grunt locally: sudo npm install grunt --save-dev
  3. Create a Gruntfile.js
@aimtiaz11
aimtiaz11 / readme.md
Last active September 25, 2016 01:31
Java - Upgrade and switch JDK versions in Linux

Upgrade and switch JDK versions in Linux

Instructions on how to install/upgrade or switch versions of Java in RHEL/Fedora Linux distros.

  1. Search using yum: yum search java | grep 'java-'
java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.8.0-openjdk-headless.x86_64 : OpenJDK Runtime Environment
@aimtiaz11
aimtiaz11 / readme.md
Last active August 29, 2015 14:21
Nodejs - Adding local npm package executables to $PATH

Adding local npm package executables to $PATH

Modify PATH variable as below after installing node.

export PATH=${PATH}:$(npm bin)

Installing local packages

After doing so you can now install and use packages locally. For example to setup grunt run:

@aimtiaz11
aimtiaz11 / readme.md
Last active January 25, 2016 03:02
Oracle Database - imp/exp

Using imp/exp

Import

imp schema_name/schema_password FROMUSER=schema_name TOUSER=schema_name IGNORE=Y FILE=EXP_SCHEMA_NAME_SCHEMA.DMP LOG=IMPORT_LOG_FILE.log

Export