Little Snippets
Every once in a while I come across some little nugget of information that I think needs to be kept somewhere so I don’t lose it and I can use it to help someone else solve a problem if they run into the same situation.
- Solaris 8,9,10
- Use “Stop-A” to interrupt the boot process. If your SPARC Solaris box is setup to use a network connection while booting and it loses the connection, all will appear to freeze. Use “Stop-A” to Abort the boot process.
- Visit http://www.sunfreeware.com for the latest in versions of SPARC and X86 compatible libraries.
- If you have a 0 capacity remaining on a disk/slice, use “du -s * | sort -rn | head” to list all directories below the current directory from highest to lowest in size. Drill down until you find suspect files (usually log files) that can be deleted to clear up space.
- Also, when looking to free up unnecessarily used disk space, use ‘find / -type f -name “core” -print’
- PHP
- “php -l {script_name}” to test syntax on a file
- HTML
- enctype=”multipart-formdata” for forms that are uploading files
- use text-align: right in style attribute of input tag to right align number fields text boxes in forms
- ASP
- CInt only covers roughly -32,000 to 32,000. You will get an overflow error if you break these bounds. Use CLng in place of CInt if it is possible to exceed this limit.
- Flex (2.x)
- don’t forget to wrap the fillColors and fillAlphas values in [ ] because its an array feature and editing the values in the Eclipse plug-in does not automatically do that for you.
- Shells
- bash
- export VAR=value - to set an env variable