Surf 11 » Surf 11

Finding the best waves on the web.

How to run IE on your Mac with VirtualBox

Link: How to run IE on your Mac with VirtualBox



Where is httpd.conf on my Mac

If you are running a Mac Apple includes a version of Apache for you. In modern versions of Mac OSX (Leopard, Snow Leopard) you will be running Apache 2.2 (as of this writing). You can find the httpd.conf file in:

/etc/apache2/httpd.conf

In prior versions of Mac OSX you might be running Apache 2.0, and your httpd.conf file may be located here:

/etc/httpd/httpd.conf


Restart Apache on a Mac

Here's how to restart Apache (httpd) web server on a Mac, open terminal and run the following:

sudo /usr/sbin/apacheclt restart

If you don't like using terminal, you can also restart apache on Mac by doing the following:

  1. System Preferences
  2. Sharing
  3. Uncheck Web Sharing (this is the Apache Service) to turn if off, then check it again to start it up.


milw0rm - exploits : vulnerabilities

Lists vulnerabilities in web apps (and other apps as well)

Link: milw0rm - exploits : vulnerabilities



MetaLab: We make interfaces

Link: MetaLab: We make interfaces



Hack My CF - Check your ColdFusion Server for Security Vulnerabilities

Link: Hack My CF - Check your ColdFusion Server for Security Vulnerabilities



How to Restrict the Use of Certain Cryptographic Algorithms and Protocols in Schannel.dll

Link: How to Restrict the Use of Certain Cryptographic Algorithms and Protocols in Schannel.dll



AdaptJ Stacktrace

Simple tool for taking a java thread dump.

Link: AdaptJ Stacktrace



Great icons for great iPhone applications

An Icon Set designed for iPhone Apps

Link: Great icons for great iPhone applications



Maatkit: A toolkit that provides advanced functionality for MySQL

You can use Maatkit to prove replication is working correctly, fix corrupted data, automate repetitive tasks, speed up your servers, and much, much more.

Link: Maatkit: A toolkit that provides advanced functionality for MySQL



Mac Terminal Open Finder in Current Directory

Have you ever wanted to open up a new Finder window from the mac shell / command line via terminal. Turns out it is pretty easy to do using mac's open command.

To open up the current terminal directory in a new Finder window just run:

open .

To open your home directory in finder run this:

open ~

Your documents:

open ~/Documents

As you might have guessed you can type in any directory and it will open that up. You can also type in a file name and it will open it up using the default application.



ASTsimpleVariableReference Error

Ever get this error with ColdFusion?

Error casting an object of type coldfusion.compiler.ASTsimpleVariableReference to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
java.lang.ClassCastException: coldfusion.compiler.ASTsimpleVariableReference
	at coldfusion.compiler.StmtAssembler.createCFloopIndexVariable(StmtAssembler.java:2020)
	at coldfusion.compiler.StmtAssembler.cfloopList(StmtAssembler.java:1838)
	at coldfusion.compiler.StmtAssembler.cfloop(StmtAssembler.java:1687)
	at coldfusion.compiler.StmtAssembler.assembleStatement(StmtAssembler.java:284)
	at coldfusion.compiler.TemplateAssembler.assembleStatement(TemplateAssembler.java:238)
	at coldfusion.compiler.StmtAssembler.block(StmtAssembler.java:201)
	at coldfusion.compiler.TemplateAssembler.assemblePage(TemplateAssembler.java:200)
	at coldfusion.compiler.TemplateAssembler.assemble(TemplateAssembler.java:77)
	at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:316)
	at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:119)
	at coldfusion.runtime.TemplateClassLoader$1.fetch(TemplateClassLoader.java:310)
	at coldfusion.util.LruCache.get(LruCache.java:180)
	at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java:254)
	at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
	at coldfusion.util.SoftCache.get(SoftCache.java:81)
	at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:476)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:79)
	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.CfmServlet.service(CfmServlet.java:175)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
	at jrun.servlet.FilterChain.service(FilterChain.java:101)
	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
	at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
	at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
	at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
	at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

It is caused when you put a variable with pound signs where it is expecting a variable name. For example this code with throw this exception:

<cfloop list="#list#" item="#item#"></cfloop>

The #item# should just be item



Alter Table Add Column on SQL Server

If you try running this command to add a new column on Microsoft SQLServer:

ALTER TABLE ADD COLUMN column_name int

You will get an error message:

Incorrect syntax near the keyword 'COLUMN'.

That's because SQL Server Doesn't like ADD COLUMN it prefers you just say ADD instead:

ALTER TABLE ADD column_name int


Forward Unix Mail to Another Email Address

How do you forward your unix mail to another email address? It's quite simple in most cases you just need to put the email address in a .forward located in your home directory. From the command line or shell type:

echo somewhere@example.com > ~/.forward


Review of Vizio VW32LHDTV40A 32

I purchased a 32" Vizio VP322HDTV10A Plasma HDTV about a month ago from Walmart (they seam to have very good prices on Vizio TV's). Overall I have been very happy with the TV.

One of the main concerns when I purchased the TV was how well the Plasma display would perform during the daylight. Plasma TV's can have more problems with glare than their LCD counterparts. While you will certainly see some reflections on the screen if the TV is in a bright room, it really is not that bad. It is not any worse than the glare you would have from a regular old CRT tube TV.

The TV has great picture, and performs really well for sporting events, and action. I don't usually watch Golf on TV, but the picture quality is so realistic on a high definition broadcast, you can't help but watch for a bit.

The only thing that I am not a huge fan of is the on screen graphics the TV provides, they are very low quality, and the fonts they use are not anti-aliased, so you get blocky text from a 1980's computer for things like closed captions.

The remote is very simplistic, anyone who is overwhelmed by complicated remote controls, or appreciates simplicity in design will like the remote. Most options that might have their own key are deferred to the main menu. The feature I use that is hard to get to is turning closed captioning on (we use this when the baby is sleeping sometimes) you have to hit a few buttons to turn it on. The TV does have a feature that automatically turns on CC when you hit mute, which is nice.



Howto List Contents of a Jar File

Ever wanted a list of files inside a jar file. It's pretty simple to do using the jar command:

jar -tf somefile.jar

You could also use this technique to list the contents of a zip file, since jar files are actually zip files.



Fixing SQL Server Users after Backup Restore

Often when you restore a backup from SQL server you run into funky problems with users. Suppose you have login cfusion and you restore a database from another server that also had user called cfusion you can't properly use this login, and you might get the error:

Error 15023: User or role 'cfusion' already exists in the current database.

To fix this I ran:

EXEC sp_change_users_login 'Auto_Fix', 'cfusion', NULL, 'password'

And it worked like a charm.



Connect to SQL Server on Non Standard Port

Need to connect to a SQL Server over TCP/IP on a non standard port (not 1433) with Microsoft SQL Server Management Studio 2005 Enterprise Manager?

Turns out the solution is also non-standard, use a comma in the host name (I had tried a colin, but that doesn't work...)

sqlserver.example.com,61433

Where 61443 would be the non standard port number.



Ext s.gif Loading from extjs.com

I noticed that when I used the Ext javascript library, that an image s.gif was loaded from extjs.com

It turns out the folks from Ext.js have defined a variable which defaults to http://extjs.com/s.gif but you should set it to your local path, as follows:

Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';

If you are using Ext 1.1 the image will be located here:

Ext.BLANK_IMAGE_URL = 'ext/resources/images/aero/s.gif';


Saving Table Times out in SQL Server 2005

I've run into this a few times, when you make a change to a table that is very big (eg million or more records) in SQL Server 2005 table designer, you typically get an message:

Saving Definition Changes to tables with large amounts of data could take a considerable amount of time. While changes are being saved, table data will not be accessible.

Usually followed by the error message:

Post-Save Notifications

- Unable to modify table.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I've seen this error when trying to make a column not null, or trying to modify an existing column.

To fix it, go to the Tools Menu and select Options then under Designers select Table and Database Designers the first option allows you to disable the timeout, or make it greater than the default 30 seconds.



Subscribe to our RSS Feed: subscribe to this feed XML
Archives   Tags   Contact