August 21st, 2003
I finished my internship at Northern Trust. I found it to be a very rewarding experience. We drove home on Saturday. We left early in the afternoon, but with traffic and the weather, what should have been a six to seven hour drive from Chicago to Pittsburgh took about ten. Then we woke up early on Sunday to take my uncle to Baltimore. I got to drive! While I was in Baltimore, I visited my friend. We had a good time. Campus is really nice when there are not many people around. Later that day, we drove back. That’s a lot of driving for one weekend.
On Monday, I finally got to use my computer again. I set it up and everything was working fine. Then I broke it. The motherboard is suposed to support up to one gigabyte of memory, but for some reason it can’t handle more than half of that. So I decided to update the firmware. Then, I tried to reboot the computer and it would not. Now I am peeved because the machine is completely non-functional, and I cannot access many of my files because they are software stripped across two disks. My only hope now is that I win an ebay auction for a replacement motherboard. Of course, even if I win it, it is not guaranteed to work. In the meanwhile, I installed Debian on my laptop, which is “working” after a fashion. I think that I will switch to Redhat soon.
Posted in Blog | No Comments »
August 9th, 2003
I met Madonna last night! I walked into a café then proceeded to pay an exorbitant sum for a double espresso and a mocha. I carried the drinks to a table and then I noticed Madonna was sitting at the table next to me. I approached her and asked her if she was really Madonna and she said that she was not. But I knew it was her. So I took out a pad of paper and a pen and asked her for her autograph. She asked me my name and then proceeded to write a letter to me. Unfortunately, I woke up before I had a chance to read it.
Posted in Blog | No Comments »
July 25th, 2003
The weirdest thing happened last night. I woke up at about 02:30 and I thought it was time to get up for work. So I gathered my things and groggily walked to the bathroom. My recollection of the event is a bit hazy, but for some reason, I walked back to my room, at which point, I noticed that it was quite early. I decided to go back to sleep.
Posted in Blog | No Comments »
July 16th, 2003
[code]
# spam.rc
# -ifile: http://www.nongnu.org/ifile/
# in addition, I use Martin Macok’s scripts for using ifile with procmail
# - http://xtrmntr.org/ORBman/ifile.procmail.html
# directories used
BINDIR=$HOME/usr/bin
# programs used
KSH=$BINDIR/ksh
# Insert ifile header info
# if you don’t want to learn from new messages, use ifile.inject.header
:0 fBw
| $KSH $BINDIR/ifile.inject-learn.header
# and now we can sort the mail with the help of ifile hint
:0: ifile.lock
* ^X-Ifile-Hint:\ spam
| $RCVSTORE +spam
[/code]
Posted in dotfile | No Comments »
July 16th, 2003
[code]
# announcements.rc
# moves all mail from addresses in announcers.lst to the folder “announcements”
# -Carlos Macasaet
# http://www.carlos-m.net/
:0
* ? formail -x”From:” -x”From:” -x”Sender:”\
-x”Reply-To:” -x”Return-Path:”\
| egrep -is -f $PMDIR/announcers.lst
{
:0: announcements.lock
| $RCVSTORE +announcements
}
[/code]
Posted in dotfile | No Comments »
July 16th, 2003
[code]
#
# Carlos Macasaet’s ZSH Configuration
# http://www.carlos-m.net/
#
# some global options
setopt KSH_GLOB
setopt SH_GLOB
setopt NO_BARE_GLOB_QUAL
setopt GLOB_SUBST
setopt NO_HUP
setopt AUTO_CD
setopt CD_ABLE_VARS
# set environment
export EDITOR=/usr/bin/vim
export VISUAL=$EDITOR
export FCEDIT=$EDITOR
export PAGER=/usr/bin/less
export TMPDIR=$HOME/tmp
umask 022
# set path and manpath
path=( $HOME/bin $HOME/usr/bin /usr/local/bin
/bin /usr/bin /usr/X11R6/bin /usr/games /usr/lib/nmh
/sbin /usr/sbin)
manpath=($manpath $HOME/usr/man)
typeset -U path manpath
# set prompt
if [[ $USER == ‘root’ ]]; then
PROMPTSUFFIX=’#’
else
PROMPTSUFFIX=’$’
fi
setopt PROMPT_PERCENT
PS1=”%m$PROMPTSUFFIX ” #prints hostname$ or hostname#
RPS1=’(%*)’ #prints current time on right
# history options
setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_REDUCE_BLANKS
setopt HIST_IGNORE_SPACE
HISTSIZE=100
SAVEHIST=100
HISTFILE=$HOME/logs/zsh_history
# Autocomplete for current dir on filetypes
compctl -g ‘*.Z *.gz *.tgz’ + -g ‘*’ zcat gunzip
compctl -g ‘*.tar.Z *.tar.gz *.tgz *.tar.bz2′ + -g ‘*’ tar
compctl -g ‘*.zip *.ZIP’ + -g ‘*’ unzip zip
compctl -g ‘*.(mp3|MP3|ogg|OGG)’ + -g ‘*(-/)’ mpg123 xmms
# Autocomplete hosts
hosts=(sol.galaxy.acm.jhu.edu fomalhaut.galaxy.acm.jhu.edu
castor.galaxy.acm.jhu.edu betelguese.galaxy.acm.jhu.edu
jhuniverse.jhu.edu hops.cs.jhu.edu barley.cs.jhu.edu
ugrad1.cs.jhu.edu ugrad2.cs.jhu.edu ugrad3.cs.jhu.edu
ugrad4.cs.jhu.edu ugrad4.cs.jhu.edu ugrad5.cs.jhu.edu
ugrad6.cs.jhu.edu ugrad7.cs.jhu.edu ugrad8.cs.jhu.edu
ugrad9.cs.jhu.edu ugrad10.cs.jhu.edu ugrad11.cs.jhu.edu
ugrad12.cs.jhu.edu ugrad13.cs.jhu.edu ugrad14.cs.jhu.edu
ugrad15.cs.jhu.edu ugrad16.cs.jhu.edu ugrad17.cs.jhu.edu)
compctl -k hosts ssh scp ping host
# Autocomplete MH folders
mhfolders=(`folders -fast | awk ‘{ print “+”$1 }’`)
compctl -k mhfolders folder scan refile flist show rmm repl forw
# write/talk completion
function whoson { reply=(`users`); }
compctl -K whoson talk ytalk write finger
# Usage: pskill pskill() {
kill -9 $(ps -aux | grep $1 | grep -v grep | awk ‘( print $1 )’)
echo -n “Killed $1 process…”
}
alias logoot=’logout’
alias feline=’cat’
alias ls=’ls –color’
alias ll=’ls –color -l’
alias md=’mkdir’
# watch for friends
watch=( $(<$HOME/etc/watchlist) )
LOGCHECK=60
WATCHFMT=’%n %a’
export PGHOST=localhost
[/code]
Posted in dotfile | No Comments »
July 16th, 2003
[code]
#
# Carlos Macasaet’s .procmailrc
# http://www.carlos-m.net/
#
#
# Common Directories
#
HOME = /home/$USER
MAILDIR = $HOME/Mail # MH… represent
LOGDIR = $HOME/var/log
PMDIR = $HOME/etc/procmail # recipes stored here
NMHDIR = /usr/lib/nmh
#
# Common Programs
#
RCVSTORE = $NMHDIR/rcvstore # stores MH messages
RCVTTY = $NMHDIR/rcvtty # new mail notification
#
# Logging Options
#
LOGFILE=$LOGDIR/procmail
#VERBOSE=yes # enable for debugging
LOGABSTRACT=all
# filter out duplicates
:0 Whc: msgid.lock
| /usr/bin/formail -D 65536 $LOGDIR/msgid.dat
:0 a:
/dev/null
#
# personal sorting files
#
INCLUDERC=$PMDIR/pager.rc # forward certain mail to my pager
INCLUDERC=$PMDIR/ntrs.rc
INCLUDERC=$PMDIR/cron.rc
INCLUDERC=$PMDIR/logwatch.rc
INCLUDERC=$PMDIR/lists/acm-members.rc
INCLUDERC=$PMDIR/lists/acm-officers.rc
INCLUDERC=$PMDIR/lists/acm-acm.rc
INCLUDERC=$PMDIR/lists/acm-linux.rc
INCLUDERC=$PMDIR/lists/bugtraq.rc
INCLUDERC=$PMDIR/lists/cryptogram.rc
INCLUDERC=$PMDIR/lists/Redhat.rc
INCLUDERC=$PMDIR/lists/mailbits.rc
INCLUDERC=$PMDIR/lists/jhu_street_hockey.rc
INCLUDERC=$PMDIR/jhu.rc
INCLUDERC=$PMDIR/jhu_cs.rc
INCLUDERC=$PMDIR/friends.rc
INCLUDERC=$PMDIR/family.rc
# these announcement mailing lists sometimes get sorted as spam
INCLUDERC=$PMDIR/announcements.rc
# filter out spam
INCLUDERC=$PMDIR/spam.rc
# these mailing lists tend to receive spam
INCLUDERC=$PMDIR/lists/acm-admin.rc
INCLUDERC=$PMDIR/lists/OpenBSD.rc
# default folder
:0
{
:0 c: inbox.lock
| $RCVSTORE +inbox
:0
| $RCVTTY -nobell
:0 e # RCVTTY doesn’t always return 0
/dev/null
}
[/code]
Posted in dotfile | No Comments »
July 9th, 2003
[code lang=”cpp”]
/* trinity.c
* Trinity, reverse-engineered by Carlos Macasaet
* http://www.carlos-m.net/
*/
#include
#include
#include
#include
extern pid_t neo;
int wake_neo() {
key_t neo;
int msgflg;
int msqid;
msqid = msgget( ftok( “/dev/null”, neo ), ( IPC_CREAT | 0240 ) );
kill( neo, SIGKISS );
}
[/code]
Posted in C/C++ | No Comments »
July 8th, 2003
[code lang=”cpp”]
/* neo.c
* Neo, reverse engineered by Carlos Macasaet
* http://www.carlos-m.net/
*/
#include
#include
#include
/* enlightenment levels */
typedef int enlightenment_level;
#define MR_ANDERSON -1
#define TOOK_RED_PILL 0
#define I_KNOW_KUNG_FU 1
#define MET_ORACLE 2
#define THERE_IS_NO_SPOON 3
#define RELOADED 4 /* I don’t have to dodge bullets */
enlightenment_level elevel;
void die();
void resurrect();
int main() {
dead = false;
signal( SIGKILL, die );
signal( SIGKISS, resurrect );
return( 0 );
}
void die() {
dead = true;
while ( elevel < RELOADED )
sleep( 3600 ); /* this number is completely arbitrary */
}
void resurrect() {
elevel = RELOADED;
signal( SIGKILL, SIG_IGN ); /* I'm neo, I can do this */
}
[/code]
Posted in C/C++ | No Comments »
June 23rd, 2003
A funny thing happened at work last week. I left for an afternoon meeting and when I cam back, my desk phone was missing. I found this quite odd. However, I did not mind too much because it just meant that I would not be able to receive any complaints for some time. But then, the next day, before my phone was replaced, I went to lunch. But then when I got back, my chair was meeting. Tim commented that perhaps they were hinting to me that they didn’t want me working there. The chair missing was of course a bit of an inconvenience. I had to borrow a chair that did not roll, swivel or have adjustable arms.
Posted in Blog | No Comments »