Just discovered a quick and easy way in vim to convert a multi-line command (saperated by a \) into 1 line.
In normal mode, type:
$xj0y$k$pjdd
This will convert
eval --some-very-long-long \
--command "that spans two lines"
into
eval --some-very-long-long --command "that spans two lines"
A Systems Engineer National University of Singapore. Currently, I spend most of my time at work on AD, Powershell, Exchange, and Office 365 design. But my interest for technology means that I will not limit myself from anything new.
Tuesday, March 20, 2012
Wednesday, March 7, 2012
ASP #include file Parent Paths error
Spent almost half a day trying to troubleshoot why some ASP scripts refuse to work when ported over from Windows Server 2003 to Win Server 2008 R2.
Turns out the offending line is this:
<!--#include file="../somefile.inc"-->
<!--#include file="../somefile.inc"-->
After a bit more google-ing, it's obvious that the problem lies in IIS 7.0 and above configuration that set Enable Parent Paths to False by default.
Solution was simple:
Go to IIS Manager, Default Web Site | (feature view) IIS | ASP | Enable Parent Paths = True
Monday, March 5, 2012
Force user logout
Just discovered a convenient way to kill (force logout) users in linux/unix.
pkill -KILL -i user
pkill -KILL -i user
Friday, February 24, 2012
Solaris slow login script
Recently, I have a consistent complain from a user about very slow SSH logins to Solaris 10.
I've tried various method to debug, looking into all sort of possible network issues. I set LookupClientHostnames to no. I even tried UseDNS no but the SSH that came with Solaris 10 doesn't recognize that command. BEWARE!! UseDNS in your sshd_config file will cause SSH to not be able to start!
At the end, I decided to time my startup script in /etc/profile
It appears that /usr/sbin/quota takes more than 20s to run. So the solution was to either modify /etc/profile and /etc/.login, or to do a touch .hushlogin in the user's home directory.
I opted for the latter.
Subscribe to:
Posts (Atom)