pkgxtra
Tuesday, Aug 2. 2005 – Category: Code, OpenSolaris
a while ago i wrote a stupid little shell script called pkgxtra that lets me easily list files owned by a package (either by .pkg filename, or package name (like SUNWcsl)). it also provides a shortcut to see which package owns a given pathname/filename.
here it is, in all its glory:
#!/bin/bash
show_help() {
echo "usage: $0 [-lfp] ";
echo " -l lists files belonging to package";
echo " -f lists files contained in .pkg file";
echo " -p show package owner of ";
}
while getopts "lpfh" flag
do
if [ "$flag" == "l" ]; then
MODE=0;
fi
if [ "$flag" == "p" ]; then
MODE=1;
fi
if [ "$flag" == "f" ]; then
MODE=2;
fi
if [ "$flag" == "h" ]; then
show_help
exit 1;
fi
done
shift $(($OPTIND - 1))
if [ "$#" -eq "0" ]; then
show_help
exit 1;
fi
case "$MODE" in
0) pkgchk -l $1|awk '/^Pathname/ {print $2}';;
1) pkgchk -l -p $1;;
2) pkgchk -l -d $1|awk '/^Pathname/ {print $2}';;
esac
NUMA observability tools
Tuesday, Aug 2. 2005 – Category: Code, OpenSolaris
I’m happy to see Sasha put up code and binaries for the NUMA observability tools I helped write tests for.
These are really cool utilities to help observe memory placement and optimise “advise” for programs to tweak where they place their memory on NUMA systems. Really cool stuff…
skippy
Wednesday, Jul 27. 2005 – Category: Code, OpenSolaris
so i’ve been using skippy for a while now on my Linux laptop. i read on [moinak's]( http://blogs.sun.com/roller/page/moinakg?entry=whenthetaskbarisnot) blog that he had to make a slight modification for Solaris… turns out this isn’t necessary under Xfce since Xfce supports the XGrabKey call.
only problem is that skippy doesn’t support Xsun’s xinerama extension. doh. i make a quick hack to wrap the Xorg Xinerama extensions, and now it works great!
you can grab my skippy-0.5.0.Xsun.tar.gz tarball and try it out. i’ve tested it on Solaris 10/SPARC under Xfce.
libgtop on Solaris 10
Monday, Jul 25. 2005 – Category: Code, OpenSolaris, OpenSource
If you are trying to compile libgtop on Solaris 10, you will notice that a bunch of the sysdeps/solaris files won’t compile, specifically sem_limits.c, shm_limits.c, and msg_limits.c. You’ll probably see errours about shminfo, etc. etc.
This is because many of these interfaces were unstable and obsoleted in Solaris 10 in favour of the (much better) rctladm interfaces. In short, you can get use getrctl to get those interfaces now.
You can read some forum msgs on dbForums regarding it.
or look at the Solaris 10 Tunable Parameters Reference Manual for a complete list of what was obsoleted.
I’ve made a patch to libgtop-2.8.3 which should fix this (it does for me, anyway). As usual – this is not an official Sun-endorsed patch in any way, form, shape, blah blah blah. Your mileage may vary.
converting m4a to mp3
Monday, Nov 29. 2004 – Category: Code
ripped a bunch of CDs on Wendy’s laptop with iTunes, which saved them in m4a format. i see gStreamer supports the m4a format, but i’d rather have it in mp3 just for uniformity.
i know i know, “you should just switch to ogg”
anyway:
perl -e ‘foreach $file (ls *.m4a) { chomp $file; $newfile = $file; $newfile =~ s/.m4a/.mp3/; faad -w "$file" | lame -b 192 - "$newfile"; }’
i know this could be written as a much shorter shell script, but i know perl better than shell scripting, and this works under my linux system – so i’ll stick with it.
Recent posts
- Gesture Lock
(Saturday, Nov 13. 2010 – 12 Comments) - ConnectIn 1.1.1 & HTC Sense UI
(Tuesday, Sep 28. 2010 – 38 Comments) - ConnectIn
(Saturday, Sep 25. 2010 – 62 Comments) - Proguard, Android, Ant, and 3rd party external JARs
(Wednesday, Sep 22. 2010 – 18 Comments)
Categories
- Android
- Cars
- ChinaBlog
- Code
- Computers
- Development
- Food
- Football
- Grommit
- Linkage
- Movies&TV
- Music
- Musings
- OpenSolaris
- OpenSource
- Outdoors
- Pets
- Photos
- Quotage
- Rdio
- Songbird
- Sun
- Travel
Grommit
Mozilla
OpenSolaris
- alan burlison
- bonnie corwin
- eric boutilier
- glynn foster
- jim grisanzio
- mark nelson
- mike kupfer
- planet opensolaris
- stephen hahn
Songbird
Archives
- November 2010
- September 2010
- August 2010
- June 2010
- May 2010
- February 2010
- January 2010
- December 2009
- October 2009
- September 2009
- August 2009
- June 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003
- August 2003
- July 2003
- June 2003
- May 2003
- April 2003
- March 2003
- February 2003
- January 2003
- December 2002
- November 2002
- October 2002
- September 2002
- August 2002
- July 2002
- June 2002
- May 2002
- April 2002
- March 2002
