avatar

Andres Jaimes

Oracle Snippets

This post will be updated with snippets for Oracle. I hope you find it useful.

 

1. Change the default date format

Most useful snippet of the year! 😉

1ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY HH24:MI:SS';
2select sysdate from dual;

2. …

RESTful URL's

RESTful operations on collections

Use pretty and RESTful URL’s.

GET /places 

returns a list of all places

GET /places/new 

returns a form to create a new place

POST /places

submits fields for creating a new place

Operate on a Record

GET /places/1 …

Intro to Responsive Web Design

This weekend I was invited to have a remote presentation on Responsive Web Design with students from the Autonomous University of Queretaro (UAQ) in Mexico. Introductory concepts are presented in code, so you have the chance to apply them …

Create a connection to MySQL in Java

This time we are going to create a basic connection to MySQL in Java and pull some data from it.

// Compile it:
// javac Mysql.java
//
// Try it:
// java -classpath mysql-connector-java-5.1.27-bin.jar:. MySQL

import java.sql.Connection;
import …

Installing Lucene/Solr on CentOS 6

This time we are going to install Solr, the super text search platform on CentOS. The installation process requires a couple extra libraries in order to work: Apache Commons Logging and SLF4J.  

Installing Java

yum install java
java -version

You …

WordPress Snippets

As a WordPress developer I have collected / created / curated many snippets that I’ve used in my projects. I hope you find them useful.

 

General HTML / WordPress tags

Get your template’s directory

1<link href="<?php echo …

iptables snippets

iptables is the default firewall you see on any linux computer. It works by allowing (ACCEPTing) or denying (DROPing) connections to the local computer. There are basically three scenarios you can deal with:

  1. INPUT: Connections generated from a …