Keith Kim’s Blog
Technology, Development, Tech Trends, Tech Team Management
22nd
AUG
Faster Vista by turning off UAC
Posted by Keith under Tips
I have been using Vista for a while — it came with my new PC, Vista Home Premium. It took some time to get used to it and it’s quite good. But I do sometimes want to go back to XP, when it is slower than XP, which I use at work, and my notebooks. Well, I was too lazy to install XP over Vista, so I kept on using it. There are just too much stuff on there, and I don’t have time to back up and install new OS, reinstall everything, and restore, so on.
So today, some software I need to use doesn’t work with UAC, or I have to buy the latest version just to run on the new OS. Heck, I always thought UAC is a good feature, but to run that piece of software which I don’t think it worth the money just to run on Vista. So I turned off UAC completely. (With Vista Home Premium, it only allows either turn it off completely, or turn it on.)
I don’t know if this is just my imagination, but it feels like the computer is running a lot faster, even all the visual effects are turned on. Well, for now, I’m keeping it off.
17th
AUG
Finding files in directories
Posted by Keith under Tips
This posting is about ‘find’ unix command.
Linux has services command to handle processes that need to come up at start up time, and shutdown when system comes down. I use Sparc Solaris, v9, and (may be I don’t know if there is) I have to (or I still) manage it manually. Sometimes I have to find what sym links are in /etc/rc*.d/ for certain app — I usually get this part wrong too often — if I want to look for :
[sourcecode language=’css’]
$ find /etc/rc*.d -name “*tomcat*” -print
[/sourcecode]
No quotes surrounding the directory pattern, no single/double quotes.
Here’s an example:
[sourcecode language=’css’]
$ ls -ld rc*.d
drwxr-xr-x 2 root sys 1536 Aug 5 13:22 rc0.d
drwxr-xr-x 2 root sys 1024 Aug 5 13:22 rc1.d
drwxr-xr-x 2 root sys 2048 Aug 5 13:22 rc2.d
drwxr-xr-x 2 root sys 512 Aug 5 13:22 rc3.d
drwxr-xr-x 2 root sys 1536 Aug 5 13:22 rcS.d
$ find /etc/rc*.d -name “*tomcat*” -print
/etc/rc0.d/K15tomcat
/etc/rc1.d/K15tomcat
/etc/rc2.d/K15tomcat
/etc/rc3.d/S51tomcat
/etc/rcS.d/K15tomcat
[/sourcecode]
17th
Vista and UAC
Posted by Keith under Tips
Sometimes you have to run certain commands or application as an adminitrator. And, right-mouse clicking, and then selecting “Runas administrator” isn’t too convenient. There are a few ways to simplify it. I’ll use Vista-Hosts file editing as an example:
1. Use “runas”
From cmd or Windows-Run, type in this:
[sourcecode language=’css’]
runas /user:administrator “notepad C:\Windows\System32\Drivers\etc\hosts”
[/sourcecode]
This will ask administrator password, however.
2. Use CTRL+SHIFT+Eneter
From Windows-Run, type below:
[sourcecode language=’css’]
notepad C:\Windows\System32\Drivers\etc\hosts
[/sourcecode]
Then, CTRL+SHIFT+Enter
3. There’s a utility, called “Start++”. You can do “sudo” with it:
http://brandonlive.com/2007/02/22/new-tool-i-made-for-vista-start/
[sourcecode language=’css’]
sudo notepad C:\Windows\System32\Drivers\etc\hosts
[/sourcecode]
That’s it!
17th
Vista and hosts file
Posted by Keith under Tips
With Vista, you can’t modify hosts file directly with a normal user. You have to become an administrator to edit the file. Here’s how:
17th
Glassfish init script
Posted by Keith under J2EE, Java
Here’s the init script for Glassfish. Change JAVA_HOME, GLASSFISH_HOME, USER variables for your environment.
[sourcecode language=’css’]
#!/bin/sh
# This is for: Sun’s J2EE sdk v5.05 (Glassfish)
JAVA_HOME=/usr/java6
GLASSFISH_HOME=/opt/glassfish
export JAVA_HOME
USER=glassfish
glassfish_stop() {
su $USER -c “$GLASSFISH_HOME/bin/asadmin stop-domain domain1″
}
glassfish_start() {
su $USER -c “$GLASSFISH_HOME/bin/asadmin start-domain domain1″
}
case $1 in
start)
echo “Starting Glassfish server:”
glassfish_start
echo “.”
;;
stop)
echo “Stopping Glassfish server:”
glassfish_stop
echo “.”
;;
restart)
echo “Restarting Glassfish server:”
glassfish_stop
glassfish_start
echo “.”
;;
*)
echo “Usage: /etc/init.d/glassfish start|stop|restart”
;;
esac
[/sourcecode]
Recent Posts
- Using SVN in Mac
- Setting up CVS pserver on OSX 10.4 and up (10.5, 10.6)
- PhoneGap: development apps for iPad
- PhoneGap install
- iPhone and iPad development
Recent Comments
- Pranav on Intro: Java ME and Palm
- Keith on Code Review tools
- Jesse Gibbs on Code Review tools
- pdumsproject on MS Project replacement (Desktop apps)
- sparky on EverNote, better than Microsoft OneNote
Categories
- Apple
- Architecture
- Books
- Clojure
- Cool Apps
- Development Tools
- Erlang
- Fun
- Golang
- iPhone iPad development
- J2EE
- J2ME
- Java
- Lisp
- Management
- PDA
- Sites
- Tips
- Unix/Linux
- Windows
Archives
- July 2010
- June 2010
- January 2010
- December 2009
- November 2009
- July 2009
- May 2009
- January 2009
- December 2008
- November 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- April 2007