Configure Finder to display the hidden files and directories.

From a Terminal session, type in the following:

To display hidden files:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

To hide hidden files:
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

Updated my blog to use Yourls plugin.

This looks like is could be a pretty interesting plugin. We will see.

Well, my first attempt at this did not work so well. I have my own domain (tyni.info) and I am now trying to use it.

Well, at least I got yourls to work. However, I still having trouble getting the twitter plugin to work.

All right, I got this to work. The version I installed today worked fine with my yourls installation using my own shortened url. Cool stuff.

I used the the version 1.2.1 of the plugin (http://planetozh.com/blog/yourls-wordpress-to-twitter-a-short-url-plugin/). This is the one that worked for me.

I downloaded and installed yourls from http://code.google.com/p/yourls/downloads/list.
I downloaded and installed t he yourls WordPress plugin from http://planetozh.com/blog/yourls-wordpress-to-twitter-a-short-url-plugin/.

Sed to remove first or last character in a string.

To remove the first character in a string:
echo $STRING |sed ‘s/.\(.*\)/\1/’

To remove the last character in a string:
echo $STRING | sed ‘s/\(.*\)./\1/’

To remove the last five characters in a string:
echo $STRING | sed ‘s/\(.*\)…../\1/’

To remove all whitespace at the end of the line:
echo $STRING | sed ‘s/[ ]*$//’

Using hping to send a upd ping.

hping2 –udp -p portnumber ipaddress -d packetbodysize

Example:
I used the following to verify a DNS listening.

hping2 –udp -p 53 192.168.0.1 -d 50

Linux as print server for Tru64.

I used the following configuration to use a CentOS 5.3 server as a print server for Tru64. Note: I used this solution for testing purposes, because some Tru64 print jobs were stopping in the middle of the job, when the job was sent directly to the printer.

On the CentOS server, I had a printer set up and working via CUPS. I started cups-lpd by using ntsysv and service xinetd reload.

On the Tru64, I created an /etc/printcap entry similar to the following:

printname:\
:lf=/usr/adm/printernameerr:\
:lp=:\
:rm=remoteprinterserver:\
:rp=remoteprintername:\
:sh:\
:sd=/usr/spool/remote/printername:

Example:
myprinter:\
:lf=/usr/adm/myprintererr:\
:lp=:\
:rm=mylinuxprintserver:\
:rp=mylinuxprinter:\
:sh:\
:sd=/usr/spool/remote/myprinter:

New look

This week I decided to tackle changing the look to the site. Basically, I am still using the Connections theme developed by vanillamist. I just decided to make it my own. I am not quite done, but so far I like it. Maybe someday, I will try create my own. I just very rarely have time for something that would require that much time, especially, with my lack of strong php and graphics skills.

Bash: Input from multiple files.

exec 3<$1 4<$2

while read file1 <&3 && read file2 <&4
do
code
done

Rsyslog: remote logging

On the client you want to log from:
vi /etc/rsyslog.conf

*.* @RemoteSyslogIPAddress:Port

Example:
*.* @172.18.1.50:514

On the remote logging server:
vi /etc/rsyslog.conf

# Begin – Allow remote logging
$ModLoad imudp.so
$UDPServerRun 514
# End – Allow remote logging

Need to send a HUP to the rsyslogd process or

service rsyslog reload

Protected: MacOSX: Connecting to a Cisco router/switch.

This content is password protected. To view it please enter your password below:

Usefull lsof options

Various useful lsof options:

To view files open by a particular PID:
lsof -p pidnumber

To show processes and the port they are running on. This is a great command to find out not only process and port, but also the command and the PID.:
lsof -i -nP # The -n does not resolve the IP addresses and ports to names.

Source: http://sial.org/howto/debug/unix/lsof/

Return top

INFORMATION