OSX Flush DNS Cache

dnscacheutil -flushcache

Javascript – One line if statement

var draggable = (disabled) ? false : true;

Mysqldump – Backup and Restore

Backup mysqldump -u devise -ppassword -h 127.0.0.1 database_name > backup.sql Restore mysql -u -ppassword database_name < backup.sql

Website scaling – no magic formula

Lately I’ve spoken to numerous entrepreneurs all keen to ensure that their new website can rapidly scale to cater for the massive amount of traffic that their brilliant idea will bring in. Thought I would write up a bit of advice from the trenches. Scaling is easy and incredibly difficult at the same time. Easy [...]

Upgrading to Lion server from OSX server 10.5.8

Unfortunately one cannot upgrade from OSX Server 10.5.x straight to Lion Server. There are two choices Upgrade to Snow Leopard Server (if you can find a copy & are prepared to shell out $400 or so. Then upgrade to Lion via the app store. Rebuild server as Snow Leopard workstation then upgrade to Lion server [...]

Landing Pages – Keeping it Simple

My three three things that a successful landing page should have (& nothing else) Simple message Form to collect emails address Thanks & opportunity to share/recommend 1 Simple Message Can a user answer these 3 questions: 1. What am I getting 2. How do I get it 3. Why I can’t live without it If not, then [...]

Options pricing – a little deeper

Getting a bit mathematical now. When pricing an option, we are attempting to put a value on the probability of future price movements. So we are now terribly interested in the mean and standard deviation of an underlyings price movements. The mean is the average price movement, whilst the standard deviation tells us how far [...]

Devise and Cancan

Been using devise for a number of projects, happy with the authentication process. Cancan (thanks Ryan Bates) allows role based permission management. Once you understand how things work together, it’s quite easy to setup and test. Found these blog posts helpful. http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/comment-page-1/#comments http://www.tonyamoyal.com/2010/09/29/rails-authentication-with-devise-and-cancan-part-2-restful-resources-for-administrators/ There are a few gaps though, that are filled in here. http://stackoverflow.com/questions/5739419/checkboxes-are-getting-but-not-putting-many-to-many-roles [...]

Valuing an option

For a simple options pricing model, the following values are needed. Exercise price Time to expiration Price of underlying Interest rates Dividends Volatility ­­ 1. Exercise price Price at which the underlying can be bought (call) or sold (put). For example for an AAPL 120 strike June contract, means the buyer can purchase 100 share [...]

Basic Option Trading Strategies

Two basic trading strategies for Options – Speculation & Insurance/Hedging. Remember the characteristics of an option. Buying a call or put option contract over a stock, gives you the right to buy (call) or sell (put) 100 shares of the underlying stock, at a certain price, on or before a set date in the future. [...]