Skip to main content


Showing posts from 2011

jQuery Ajax and Passing Data

I was having an issue the other day with passing an ampersand into a script via jQuery Ajax. 

I was doing this: data:"category="+category+"&groupname="+groupname, If the groupname had an ampersand in it the variable was getting cut off. After do some research on the issue I found a better way to pass in data. This improved way of passing in the data automatically url encodes the data to be passed in properly.

Chrome extensions I use on a regular basis

Google Chrome Sync feature makes it easy for me to remember what extensions I use because if I reinstall and  re-enter my account credentials it will reinstall the extensions for me.  It is a pretty cool feature.

Here are the chrome extensions I use on a regular basis.  I have a few more installed that I have tried, but these are the extensions I use on a regular basis.

Screen Capture (By Google)

Auto Refresh Plus

Last Pass

Mail Checker Plus for Google Mail

Which extensions can you not live without?

How to Increase Memory in Tomcat - Railo Setup

This might be common knowledge to most, but I have to look it up every time.

If you need to increase the memory in Apache Tomcat.

Look here:  /opt/railo/tomcat/bin/

JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=128m ";   # memory settings.

Remember to restart Railo / Tomcat   afterwards:

/etc/rc.d/init.d/railo_ctl restart

How to get ProxyPass to ignore a URL so you can still use Apache HTACCESS

On a few of my servers I use Apache with Apache Tomcat. and ProxyPass to forward requests from apache over to Tomcat for my Coldfusion pages.

The part I have been struggling with for so long was how to do password protected directories in apache.  Either by adding the config to the VirtualHost directive or by .htaccess.

It seemed no matter what I did, requests were getting proxied and there was nothing I could do about it.

Tonight I finally found my answer:

The ProxyPass !  combo:

ProxyPass /dealers/ !

Here is the whole apache configuration I use for connecting Apache to Tomcat and URL Rewriting:

I found this mentioned on a Sitepoint Post

ColdFusion By Example - Comparing strings

After a slow start I finally completed the first post of my Coldfusion By Example series.  I am not extremely happy with it yet, but I need to start somewhere.  I feel like I did not add enough explanation to the post. There is not much to say about comparing strings.  I will review the post again in a couple days and see if I can add any more to it.  I am also open to any suggestions.

How to compare strings in Coldfusion

FTP Script from the command line

For the longest time I have always used wget to handle command line ftp downloads.For one particular download I was doing wget stopped working with wildcards.  Probably something to do with the server I was connecting to.I started researching and found a cool windows batch file to do this:Windows server 2003 and Windows XP – How to script file download from FTP serverHere is the script from the example altered for my needs.@echo off
echo user MyUserName> ftpcmd.dat
echo MyPassword>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo prompt>>ftpcmd.dat
echo cd IDX>>ftpcmd.dat
echo mget pics-*-2*.tar>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat SERVERNAME.COM
del ftpcmd.dat

Installing sun-java6-jre on Ubuntu 10.10

Today I was trying to install Sun Java install sun-java6-jre on Ubuntu 10.04 LTS, type the commands below in Terminal:

Code: sudo add-apt-repository "deb lucid partner" Code: sudo apt-get update Code: sudo apt-get install sun-java6-jre Credit I ran the first command above I received the following error:sudo: add-apt-repository: command not foundI ended up having to run this command and everything was made bettersudo apt-get install python-software-properties

Break up a large filename for transfer

Today I was trying to transfer a file from 1 server to another.  At first I thought the file was too large, so I set out to break up the file.Credit goes to Techie Corner.To Split the file:split --bytes=500m /home/photosrandycc.tar.gz /home/buTo Restore the file:cat bu* > photosrandycc.tar.gzTurns out the real issue was virtualmin actually set a 1GB quota.

Flush Logs on MySQL Without Restarting the Server

For the longest time I thought you had to stop mysql and rename the log files and then restart when on Windows.That's definitely not the case.Simply rename the error log file and then run this command and it will reset the error log file.  Be sure to change out the username to your username. mysqladmin -urandy -p flush-logs