Oracle Timestamp

I’m lazy and keep forgetting the format string for formatting dates into strings that I can understand, so here it is:

Function:

to_char()

Arguments:

1) The date column you want to format

2) The mask – personal most commonly used:

‘yyyy/mm/dd hh:mi:ss am’

Leave the first comment

Hibernate configs

Documentation

In the hibernate.cfg.xml there is an option – ‘hibernate.hbm2ddl.auto’ that controls how it interacts with the database schema (assuming the user you used to connect has the appropriate privileges). The options for this config are as follows:

So the list of possible options are,

  • validate: validate the schema, makes no changes to the database.
  • update: update the schema.
  • create: creates the schema, destroying previous data.
  • create-drop: drop the schema at the end of the session.
Leave the first comment

Good presentations

Good stuff:

http://net.tutsplus.com/articles/web-roundups/10-more-awesome-web-development-screencasts-and-presentations/

Also, if you’ve never been to ted.com, check it out, there’s some cool stuff there.

Leave the first comment

Super Computers

Amazing statistics that only prove one thing – Linux servers still rock.

http://news.bbc.co.uk/2/hi/technology/10187248.stm

Leave the first comment

Crossing


Leave the first comment

Argument for the Soul

Slightly paraphrased -

We must allow the existence of the soul in order to explain free will. Otherwise, we are just machines with genetically coded instructions from our creators.  ~ Shelly Kagan

Leave the first comment

Spring Source Tool Suite

Holy crap, half a day and dozens of Google searches later, I found the 3 things necessary to install STS in Eclipse 3.5.2

Behold !

https://issuetracker.springsource.com/browse/STS-831

Adding these 3 update sites:

http://download.eclipse.org/tools/mylyn/update/e3.4
http://download.eclipse.org/tools/mylyn/update/extras
http://download.eclipse.org/tools/ajdt/35/update

The one that fixed my particular issue was this one:

http://download.eclipse.org/tools/ajdt/35/update

Leave the first comment

Conficker

Yikes – http://www.theatlantic.com/magazine/archive/2010/06/the-enemy-within/8098/1/

Leave the first comment

Potato Gnocchi and Sausage

http://www.thedragonskitchen.com/2008/07/potato-gnocchi-sausage.html

Ingredients:

1 18 0z package of Potato Gnocchi
3 smoked pork sausages (turkey sausage works great too), sliced
1/4 cup of chopped onions
1 clove of garlic, minced
2 tablespoons of butter
pinch of hot pepper flakes
1/2 tablespoon of fresh thyme leaves
1/2 tablespoon of fresh oregano, chopped
1 cup of frozen peas, run under water to thaw (optional)
1/4 cup of grated parmesan cheese
salt & pepper to taste

A new favorite, one slight modification from the recipe above:

Red peppers instead of onions, sweet italian sausage, and no hot pepper flakes (I do love hot though)

Leave the first comment

Find filename given the whole path

Often times in scripting on a Linux box, you end up passing around the full path to a resource (it’s messy coding tbh).

This is great until you want to use just the filename in something.

Here’s a simple Python method that takes a full filename with path and grabs just the filename.

def findFileName (self, fileNameWithPath):

splitStr = fileNameWithPath

strList = splitStr.rsplit(‘/’, 1)

fileName = strList[len(strList) - 1]

return fileName

Leave the first comment