Configuring Apache on CENTOS: Just some random notes on what I had to do to get my Perferred tools installed on Apache under centos: yum install php-Smarty php-pear php-pear-MDB2 php-mysql To get pear configured I ran these commands: pear upgrade MDB2 pear install ‘MDB2#mysql’ pear channel-discover pear.firephp.org pear install firephp/FirePHPCore After starting up mysqld I [...]
Entries for the ‘Uncategorized’ Category
Calculating the Fiscal Year in Excel
Jason came up with this nifty formula to calculate the fiscal year in excel based on a string in the YYYY-MM-DD format. It could be adapted to support other formats by changing the MID substring values ( MID is the excel Substring function). This example references a date in cell AB7 — you’ll have to [...]
Using CRL lists with PKI certificate of authorities
Notes from 3/8/2010 troubleshooting crl issues. Users called and could not access the cobra web site. They were using certificates issued by Verisign – specifically: CN=VeriSign Client External Certification Authority – G2 I checked our page using the command: openssl s_client -showcerts -connect usecobra.com:443 -prexit and we were not accepting verisign G2 cert on cobra [...]
converting julian date to real date in mysql
We’ve got data that uses a funky date format — not a true julian date but the Year followed by the DAY of the year. i.e. 2010005 = January 5th, 2010 2010031 = January 31st 2010 2010365 = December 31st 2010 This little snippet of code will allow you to select it from the mysql [...]
Vim colorschemes
If you want to customize the colors you get in VIM Here is a gallery: http://vimcolorschemetest.googlecode.com/svn/html/index-html.html To try out different schemes you can type :colorscheme XXXXX in vi where XXX is the scheme name (without the .vim extension ) Once you find one you like you can put that command in your .vimrc in your [...]
Separating storage of mysql database files
We often have very large databases we want to create in mysql. If we don’t have enough space in the /var/lib/mysql partition it is handy to be able to specify that a specific database be stored on another drive. This can fairly easily be done by using innodb_file_per_table parameter in your my.cnf and using symbolic [...]
Loading compressed file into mysql without uncompressing
If you have a compressed file from a mysqldump backup of your mysql database, and you don’t have space to uncompress it to load it on another machine. You can load it directly from the compress file using this command: zcat backupdump.sql.gz | mysql -uusername -p databasename This will uncompress the file on the fly [...]
Fixing VIM to allow smart match finding using the percent key
Edited the file /usr/share/vim/vim70/syntax/smarty.vim Added the following code: ” HTML: thanks to Johannes Zellner and Benji Fisher. if exists(“loaded_matchit”) let b:match_ignorecase = 1 let b:match_skip = ‘s:Comment’ let b:match_words = ‘<:>,’ . \ ‘<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,’ . \ ‘<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,’ . \ ‘<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>’ endif This sets the HTML tag matching words for the matchit plug in when [...]
Background Gradient Image Creation Tool
If you need to create a gradient image for a background you might try this tool. It is pretty slick. http://www.ogim.4u2ges.com/gradient-image-maker.asp
Faster MYSQL Index creation
Creating indexes in mysql on large tables can take a long time. Because it makes a temporary copy of the entire DB file first then creates the indexes. So be sure you have enough free space for the complete DB ( MYI and MYD for MYISAM databases ) plus space for the new version. If [...]
