To connect to a box on your network that is running Oracle Database, you will first need to allow connections to Oracle through your firewall.
If you’re running CentOS, RHEL, Fedora or any other Linux variant that uses
iptables, use the following commands to create a firewall exception (Assuming you’re running your listener on port 1521 - check with
sudo lsnrctl status):
sudo iptables -I INPUT -p tcp --dport 1521 -j ACCEPT
If you’re running a high-availability system of some kind, chances are you are into some sort of Load Balancing. If you happen to be writing a Java app, and happen to be using Apache Tomcat as your servlet container, then this tip is for you.
I had a system which needed to be HTTPS-only but also have the SSL terminated at the load balancer. Naturally, I forwarded the HTTP and HTTPS ports on my Elastic Load Balancer and had my application configured to redirect any insecure connections to an SSL connection. I started having a couple of strange issues where occasionally it would leave the connection on HTTP when it should have been redirecting.
My setup was basically:
HTTP (80) -----> ELB -----> Tomcat (8080) HTTPS (443) -----> ELB -----> Tomcat (8080)
Turned out, I needed to set a couple of extra options in my Tomcat HTTP Connector section (find it in
server.xml). This was the combination of options that did it for me:
From time to time, I have been known to accidentally type my password into a “username” prompt in a
bash shell. In that situation, the password you entered is now a part of your
~/.bash_history file forever, unless you truncate or redact it.
If you’re writing a performance-focused app, it’s nice to be able to time how long various pieces of code take to execute. Below is the class I use (called
StopWatch) and a really simple example of how I use it.
Something I noticed as a general trend with modern technology (especially in mobile development) is a trend away from shiny, glossy UI elements like icons and buttons to a more flat, conservative style.
Here’s a really interesting discussion I found about the subject on the UX stackexchange site http://ux.stackexchange.com/questions/35576/what-explains-the-current-shift-from-glossy-uis-to-matte-uis Looks like the main culprits would be Windows and Android, while Apple seems to be sticking with what they know (for iOS at least).
I recently came across a neat piece of software that maps out your mouse movements and creates artwork out of them. Check out the image below - it’s a graph of my mouse movements on my left monitor over a 9 - 5 working day. Click to see full resolution.
The software I used is called IOGraphica http://iographica.com - try it out and see what you get!
Length: 92 words or 1 min Tags: discoveries
Golfing is the perfect amount of exertion for a desk surfer like myself.
Imagine a scenario where you have a git repo with 2 branches;
master, the production-ready branch and
dev, the branch where all the development occurs.
Now imagine that you accidentally made a commit on
master, when really it should have been on
dev. If you have not yet pushed to a remote repository (like Github), you can undo that commit using
git reset like so:
git reset --soft HEAD~1
Sign this petition to get Oracle to stop bundling the Ask toolbar in with the Java installer. It’s basically AdWare that hijacks your home page and default search engine. It’s got to stop!
Length: 34 words or 1 min Tags: discoveries