in8notes

This portion of my site is powered by Blosxom. Blosxom is a perl script whose functionality here is extended through several plugin scripts in order to dynamically assemble a multitude of separate plain text files stored in a directory tree on the server into a cohesive, dated and RSS enabled weblog. Now in daily (r)sync with the directories on Nate's Powerbook.


home / computers



blosxom
categorytree plugin
blox plugin
find plugin
breadcrumbs plugin



       
Return to in8sworld.net


mc without function keys

The Midnight Commander uses the F1 - F10 keys as keyboard shortcuts for commands appearing in the file menu. The escape sequences for the function keys are terminfo capabilities kf1 trough kf10. On terminals without function key support, you can achieve the same functionality by pressing the ESC key and then a number in the range 1 through 9 and 0 (corresponding to F1 to F9 and F10 respectively).

Last saved: 01/15/2010
Links: /computers/unix / mc-function.txt

phpmyadmin won't run on osx

Attempting to login to my local installation of PHPMyAdmin on Mac OS X Leopard for the first time, I received this message:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

Assuming the server is installed and running, these problems are almost always caused by incorrect path issues. A Google search brought up this solution.

Solution:

1. Open the terminal
2. sudo mkdir /var/mysql
3. sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
4. Reload the login page and login

Last saved: 12/17/2009
Links: /computers/mac / phpmyadmin-error.txt

Quitting Midnight Commander

My F10 key is grabbed by Expose for other nefarious purposes, so this little tidbit comes in handy when using mc over ssh on the Mac:

  1. Esc-1 = F1 ... Esc-0 = F10

Last saved: 03/21/2009
Links: /computers/mac / quittingmc.txt

A list of the junk on my palm pilot using pilot-xfer

[in8spbook:~] in8% pilot-xfer -l -p usb:

Listening for incoming connection on usb:... connected!

Reading list of databases in RAM...
SurveyMateDBD
SurveyMateDBC
SurveyMateDBQ
SurveyMateDBL
SurveyMateDBS
SurveyMateDBA
ACDSee_ACDS_appl_a68k
N8Stocks
Planetarium_AHoP_appl_a68k
CMAuth-View
BigClock_BClk_appl_a68k
Emily b
burglaries
Guild-Verse
N8-HealthNotes
N8-Journal
N8-Notes
N8-Notes-MacOSX
Radio Codes - FireDept
Radio Codes - Police
Songs
Trubisz
Watched Stocks
Linux Diary
N8-hardware
Music Notes
QCWebBookmarks
ZBoxZ_BOXR_appl_a68k
IBPlug WordSmith
Windows Bitmap
BLBookmark
Bookmarks-View
DateBk5_CESF_appl_a68k
Converter_CNvt_appl_a68k
ChangeName_CRM4_appl_a68k
Gammon_CSMT_appl_a68k
ChessGenius_ChsG_appl_a68k
CityTime_CiAa_appl_a68k
ChordDB_Cord_appl_a68k
Datebk5DB
DatebookHistoryDB
CityTimeDB
CordDB-Cord
Default-ETSC
StarSyncDB
hotdateDB
InStep Font Library
LoanHelperDB
Yale Bright Stars
Caldwell Catalog
Jack Bennett Catalog
LauncherIII ToBeDeleted
LauncherIII CachedIcons
LauncherIII Database
Queries
RNWKDB
Schlep
VpadDB
AddressDB
Bluetooth Trusted Devices
DatebookDB
ExpenseDB
locLDefLocationDB
MailDB
MemoDB
ConnectionMgrDB
ConnectionMgr50DB
NetworkDB
npadDB
PhoneRegistryDB
ToDoDB
locLCusLocationDB
FRC-Xmas2004WorkGifts
N8DB-FirBrook
dbScriptCommands
Solara Gas
N8DB-Videos
FRC-Xmas2002WorkGifts
N8DB-DuffyWindowsLabor
N8DB-CamryGas
Sienna
DB_DBOS_appl_a68k
DiddleBug_DIDB_appl_a68k
InterestingLabels
Labels
PastViews
Segments
Daylight Savings Rules
PlnLogDB
PlnCometsDB
UserObjsDB
PlanetariumDB
BoxMan_Solution_DB
BoxManDB
PalmName_prefs
DiddleBugDB
Go169DB
Go81DB
kMoriaScoreDB
kMoriaDB
CalcDB-OpCl
CalcDB-H-OpCl
BBC
powerOneDB
pdQmailTOC
Eudora_Edra_appl_a68k
PlainFTFt
Filez_Filz_appl_a68k
DES Library
MD Library
Z Library
GrxViewLite_GVLt_appl_a68k
Keys-Gtkr
go169_Go16_appl_a68k
Go81_Go81_appl_a68k
Keyring_Gtkr_appl_a68k
DBHelp
Hot Date_HOTT_appl_a68k
MSMount Heap
BLHistory
HypT-View
InStepPrintDocs_ISG3_hide_a68k
InStepPrintDocRtf_ISG3_hide_a68
InStepPrintDocEng_ISG3_hide_a68
InStepPrintDemo_ISGI_appl_a68k
Internet Prefs Database
Internet Prefs Panel_Iprf_panl_
PToolboxLib_JHSU_appl_a68k
Image007.jpg
PlkrKeyboardMap
DBDatabases
LMCache-View
pdQmailLittleTOC
MSDW AppList
PlkrDocList
NewsGroup-7
NewsGroup-6
NewsSubscriptions
NewsGroup-1
NewsGroup-2
NewsScores
NewsServers
NewsGroup-3
NewsHistory
NewsGroup-4
NewsGroup-5
NewsArts
Ref-AmericanPresidents
N8DB-ProjectPriorities
Ref-US Mint 50 State Quarters
PlkrDB
Plkr-METW Rulebook
Plkr-Lyrics-Irish
Plkr1-Guide Penn-Mush God
Plkr1-NYtimes
Plkr1-BBC
Plkr-911 Commission Repor
Plkr1-Lyrics-Rock
Plkr1-Welsh Castles
Plkr-Mammalia
Plkr-Evolutionary Tree
Plkr1-Photoshop trick
Plkr1-Lyrics-Nate
Plkr1-Book of Song
LauncherIII_MjBb_appl_a68k
kMoria_Mria_appl_a68k
pdQmailMsgs
BLNavHistory
RootObj-View
Easy Calc_OpCl_appl_a68k
GRIMMSON_PJUg_appl_a68k
WCALoader_PLMR_appl_a68k
PiNGer_PNGv_appl_a68k
PPur-PlugIn_PPur_appl_a68k
TMP--XXL
HW4 - q1
LIPA KW use
BLParams
Clock_PcLK_appl_a68k
Plucker_Plkr_appl_a68k
Eudora Web_QCwb_appl_a68k
QueriesApp_QRYS_appl_a68k
RealOne_RNWK_appl_a68k
Die Roller_Rolr_appl_a68k
DateBk4HelpDB
CRMASave
kMoriaSaveDB
kMoriaSave0DB
BLSecSess
Tolkien - HOBBIT
Lat/Long/TZ List
Brothertown Indians
TLSSesDBEdra
TattooArtist_TTOO_appl_a68k
Eudora Scratchpad
Voice Pad_Vpad_appl_a68k
Weasel_DocInfo_DB
WordSmith_WrdS_appl_a68k
PACE Data Store Reserve
BluetoothPnl_abtp_panl_a68k
Address Book_addr_appl_a68k
PalmPatch
WebLib Autofill
Planetarium
BigClock
DateBk5
Converter
ChangeName
ChessGenius
CityTime
ChordDB
DB
DiddleBug
Eudora
Filez
GrxViewLite
go169
Go81
Keyring
Hot Date
InStepPrintDemo
PToolboxLib
LauncherIII
kMoria
Easy Calc
GRIMMSON
WCALoader
PPur-PlugIn
Plucker
Eudora Web
RealOne
Die Roller
WordSmith
bkupBackup
smorse
Alarmlist
bkupBackup_bkup_appl_a68k
Buttons_bttn_panl_a68k
BtTransport
Web DB 2
ClipperCache
Calculator_calc_appl_a68k
Web Cert DB
Card Info_cinf_appl_a68k
AddressCitiesDB
CitiesDB
CookieDB
Web DB 3
AddressCompaniesDB
AddressCountriesDB
AISO-Latin2
ADOS-CP437
BISO-Latin2
BigClock data
PPur_Data
Date Book_date_appl_a68k
Dial_dial_appl_a68k
Digitizer_digi_panl_a68k
WrdS_Docs
Date & Time_dttm_panl_a68k
Expense_exps_appl_a68k
WrdS_FontDB
Formats_frmt_panl_a68k
GrxViewJpegLibARM
InStepPrintEngine
InStepPrintDate
InStepPrintDocEng
InStepPrintDocRtf
InStepPrintDocs
Web DB 1
GrxView-UI-ListView
GrxViewLiteSharedLib
RealMP3FF
RealMP3Codec
RealRMFF
RealRMCodec
RealDRM
FATFSPatch
PlnStarData.lib
sslplus
db-DB3vfs
db-memoexport
db-DB2
db-MobileDB
db-informations
MSDW
MathLib
NSBMultimediaLib
RealLib
SpellSmith
ZLib
BtLib
HALSndLib
Net Library
FTFontListDB
Launcher_lnch_appl_a68k
psysLaunchDB
Graffiti ShortCuts
MobileDBCatalog
Memo Pad_memo_appl_a68k
Connection_modm_panl_a68k
MyFavorite_myfv_appl_a68k
Network_netw_panl_a68k
Note Pad_npad_appl_a68k
WordSmithOpen
RealOne_enUS
BtLib_enUS
Owner_ownr_panl_a68k
PalmAudioUpdate_palU_appl_a68k
Internet Prefs Panel
EricssonT68
Phone_phop_panl_a68k
SlotDrvrPnpsApp-pnps_appl_a68k
Power_powr_panl_a68k
Preferences_pref_appl_a68k
Bluetooth Prefs Backup
Unsaved Preferences
Net Prefs
smorse_sMRS_appl_a68k
Security_scrt_panl_a68k
SoundsAlerts_sdal_panl_a68k
Setup_setp_appl_a68k
ShortCuts_shct_panl_a68k
System MIDI Sounds
Saved Preferences
AddressStatesDB
6-36-pm.wav
6-32-pm.wav
6-27-pm.wav
4-59-pm.wav
8-50-pm.wav
7-21-pm2.wav
AddressTitlesDB
To Do List_todo_appl_a68k
World Map
VendorsDB
WrdS_Key

List complete. 337 files found.

Thank you for using pilot-link.

Last saved: 11/07/2008
Links: /computers / pilot.txt

Tidying up

from
http://www.ibm.com/developerworks/library/x-tiptidy.html

Obviously, the first step is to download and install HTML Tidy (which you'll find in Resources). HTML Tidy is available on most platforms, including Windows, Linux, and MacOS. The default executable is a command-line tool, but GUI versions are available for Windows and MacOS.

To run HTML Tidy, open a terminal and issue the following command:

tidy -asxhtml -numeric < index.html > index.xml

That's it! HTML Tidy immediately converts index.html into index.xml. HTML Tidy will print messages that highlight issues with the original HTML document during the conversion. In most cases, you can safely ignore these messages.

HTML Tidy runs as a filter, so it expects standard input and it prints the result to the standard output. The redirection operators (< and >) allow you to work with files. By default, HTML Tidy produces a clean HTML page, but you can set two options to output XML, instead:

* -asxhtml outputs XHTML documents instead of HTML.
* -numeric uses character entities instead of HTML entities. For example, î is replaced with î.

Last saved: 08/23/2008
Links: /computers/code / xml-tidy.txt

International Characters in Mac OS X

from http://webct.pcc.edu/support/langmac.html

Some language classes at Portland Community College make use of WebCT to compliment their course. WebCT provides excellent tools for online communication. The mail tool, discussion tool, and chat tool can all be used by students and faculty to communicate using what they've learned in class.

One problem that these courses encounter is related to some of the characters in different languages that don't show up on our keyboards. Not to fear, there are ways around this using keyboard shortcuts and using tools built in to the Mac OS.
Keyboard Shortcuts

There are many keyboard shortcuts on the mac for inserting characters. To insert a character with an accent, type the key combination then the letter you want to insert.

For example, if you want to type á, you would press option-e (option and E at the same time), then press the A key.
For French

* ê -- accent circumflex (option-i)
* ü -- accent tréma (option-u)
* á,é,í -- accent acute (option-e)
* à,è,ì -- accent grave (option-`)
* ç -- accent cedilla (option-c)

For German

* ü -- umlaut (option-u)
* ß -- esset (option-s)

For Spanish

* á,é,í -- accent (option-e)
* ñ -- accent tilde (option-n)
* ü -- umlaut (option-u)
* ¿ -- upside-down questionmark (option-shift-/ )
* ¡ -- upside-down exclamation (option-1)

For Other

* ø -- option-o
* è -- option-`
* ñ -- option-n
* å -- option-a
* ü -- option-u
* ç -- option-c

To apply an accent to a capital letter, also hold down the shift key.

Last saved: 03/15/2008
Links: /computers/mac / intl-char.txt

Oops, my secret key expired!

http://docs.indymedia.org/view/Sysadmin/GnuPG

gpg --list-secret-keys
and note down (or copy) the ID of the key whose key expiry you would like to edit (e.g. '277FF772'). Then pass the key ID to gpg and enter its console mode:
gpg --edit-key 277FF772
Now select the first sub key (subkey 0):
Command> key 0
and edit the expiry options:
Command> expire

You can now set the expiry for this subkey (usually this is the public key part of the private/public key pair).

Changing expiration time for the primary key.
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Key is valid for? (0) 1y
Key expires at Di 17 Jun 2008 13:26:24 CEST
Is this correct? (y/N) y

GPG will then show the updated key data.

Repeat the above steps for all sub keys. Start by selecting the second subkey:
Command> key 1

Finally, quit the GPG console and save any changes:
Command> quit

Last saved: 03/02/2008
Links: /computers / gpg-expired.txt

Log a user out remotely

Over an ssh connection, you can use the following shell command to list the processes of a user in order so that the lowest number is at the bottom (so you see it when the script finishes). This is probably the x-session manager or initial bash login. Kill that process to kill the user session.

ps aux | grep username | awk '{print $2 " " $11}' | sort -gr

Last saved: 02/23/2008
Links: /computers/unix / killusersession.txt

Screenshots in OSX

I feel like an idiot. I've been using an application (Freesnap) forever to take screen captures of things in OSX. The ability to capture the screen (or a portion thereof) is friggin built in. Yes, Printscreen or ALT+Printscreen in Windows captures the screen, but you have to paste the capture into a program to save it. In OSX you just Command+Shift+3 or Command+Shift+4 to capture the screen or portion thereof, and it saves the capture right to the desktop, handy!

Last saved: 02/16/2008
Links: /computers/mac / screencaptures.txt

Getting OSX to connect up to a samba share on Ubuntu

this was just what I needed to get it to work.

  1. Examination of the sample /etc/smb.conf file reveals that Samba/Ubuntu-Feisty wants to use smbpasswd, so you have to run this one time to create the smbpasswd file. As root:

mksmbpasswd /bin/cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd

  1. This disables all the users in the target file, so enable the user(s) you want to be able to access shares. As root, run:

smbpasswd -e username

Users can run smbpasswd themselves to update their passwords from here on.

Last saved: 01/25/2008
Links: /computers/unix / samba-passwords.txt

Killing all vncserver sessions

Watch the placing of the colon after kill. It should be vncserver -kill :1

The :1 is togethor. There is a space between kill and :1 so it
is -kill:1

Hope this helps.

Last saved: 12/18/2007
Links: /computers/unix / vncserver.txt

Invert colors on Powerbook

High Res for outside viewing"
ctrl-cmd-option-8

or

Incremental shift to High Res invert color
command-control-option-. (repeatedly)
command-control-option-,

Last saved: 12/17/2007
Links: /computers/mac / highres.txt

NAS checklist

40G Music
20G Personal Files in8
20G Personal Files Cathy
20G Movies
10G ISO

320G Raid 1 (150G space)

Services
iTunes server
UpnP AV?
HTTP (w/Mysql and PHP?) - Synology
FTP server

Diskful - with drives
BYOD - bring your own disks

        1. RPM SATA

Seagate ST3500641AS 500GB SATA II

Last saved: 12/16/2007
Links: /computers / nas.txt

cd SDL-1.2.12/

make distclean
./configure --prefix=/opt/dosbox --enable-static --enable-video-opengl \
--enable-video-cocoa --disable-video-x11 --enable-nasm --enable-cdrom
make

cd dosbox-0.72/
make distclean
./configure --prefix=/opt/dosbox --enable-static --with-sdl-prefix=/opt/dosbox \
--enable-opengl --enable-fpu-x86 --enable-dynamic-x86
make

export PATH=opt/dosbox/bin:$PATH
export CPPFLAGS='-I/opt/dosbox/include -I/usr/X11R6/include -I/usr/include'
export CFLAGS='-I/opt/dosbox/include -I/usr/X11R6/include -I/usr/include'
export CXXFLAGS='-I/opt/dosbox/include -I/usr/X11R6/include -I/usr/include'
export LDFLAGS='-L/opt/dosbox/lib -L/usr/X11R6/lib -L/usr/lib'

Last saved: 12/16/2007
Links: /computers / dosbox.txt

Updating Darwinports

sudo port -d selfupdate

Last saved: 12/10/2007
Links: /computers/mac / darwinports.txt

"Mr. Gates acknowledged today that the company's error reporting

service indicated that 5 percent of all Windows-based computers
now crash more than twice each day."
-- From the New York Times July 25, 2003

Last saved: 11/25/2007
Links: /computers/windows / error-reporting.txt

Disable Dashboard

6/3/2005 in System Software Notes by face

Controlling the dashboard. Sometimes you just don’t want it around.
Note: This is a per user setting. I do not know how to disable it by default for every user.
Possibly if you make this change to /Library/Preferences/com.apple.dashboard -

Make Dashboard go away

defaults write com.apple.dashboard mcx-disabled -boolean YES

Make Dashboard come back

defaults write com.apple.dashboard mcx-disabled -boolean NO

You have to restart the Dock to have this take effect

killall Dock

The terminal is your friend.

Last saved: 10/20/2007
Links: /computers/mac / disabledashboard.txt

Mediawiki settings I keep losing

from http://meta.wikimedia.org/wiki/Anti-spam_Features

If you want to create a "gated community" where new users can't even register without asking you to set up an account for them, add the following to your LocalSettings.php:

#Disallow creating accounts
$wgGroupPermissions['*']['createaccount'] = false;

Last saved: 09/09/2007
Links: /computers/code / wiki-settings.txt

Creating a new CVS repository

I successfully created a repository in ~/myproj called spec with the contents of my ~/Sites/frc/spec directory by CDing into that spec directory and issuing:

cvs import -m "FRC spec" spec specphp spec_0
It was driving me crazy, since I was always issuing the command from the myproj directory at first and it was dumping all the other projects in the myproj directory in there too. Trouble is, it didn't create a directory called spec in there, so you can't see the files there or anything. You just have to know that its been checked in? Well I'm still learning my way around.

I suppose you can list the modules easily enough.

Remember that after importing the project, rename the original directory (to move it out of the way). Then use cvs checkout to check out the project to the original location. Once you verify its all there, you can delete the original directory.

Last saved: 07/15/2007
Links: /computers/cvs-stuff / newCVSproject.txt

Redirect with a query string

I originally had a post in Geeklog which was indexed in search engines here and there and linked off friend's sites. Instead of getting them to change the link, I used a Redirect rule in my .htaccess file to point to the right place.

The original Geeklog url had a query string (the question mark and equals sign part)
http://in8sworld.net/article.php?story=20040426185512453

When I moved the site to Wordpress, the same page now lives here:
http://www.in8sworld.net/blog/index.php/archive/trespassengers-debut/

I added these two lines to my .htaccess (on Dreamhost this has to reside in the 'domain directory'): The first line says to look for a condition where
story=20040426185512453
(ie: when somebody clicks a link that has that portion as a query string). The second line tells apache to replace
article.php (plus the query string) ?story=20040426185512453
with what follows.

rewriteCond %{query_string} story=20040426185512453
rewriteRule ^article\.php$ http://www.in8sworld.net/blog/index.php/archive/trespassengers-debut? [R,L]

Last saved: 06/09/2007
Links: /computers/unix / redirectquerystring.txt

jdMorgan

#:1497621 6:14 pm on May 12, 2005 (utc 0)

This stuff is rather complex. It involves converting the octets (the groups of numbers delimited by the periods) of the address or address range to binary, and then generating a "mask" that is used during comparison of the incoming address and the specified allow/deny directives.

A basic example would be that you want to deny 192.168.192.0 through 192.168.255.255

In binary (use the Windows calculator or equivalent) that is 11000000.10101000.11000000.00000000 through 11000000.10101000.11111111.11111111

Having derived that, you now need to generate either a netmask or a CIDR. The easiest way to do it is to line up the start/end addresses vertically, and then examine them to see which bits change between the first and last address of the range. Then mark those that don't change with ones and those that do with zeroes:

11000000.10101000.11000000.00000000
11000000.10101000.11111111.11111111
-----------
11111111.11111111.11000000.00000000

This yields the netmask, which when converted back to decimal octets is 255.255.192.0

To get a CIDR, you count the number of ones from the left, in this case 18.

So, you would use

Deny from 192.168.192.0/255.255.192.0 (Network/netmask pair -or-
Deny from 192.168.192.0/18 (Network/nnn CIDR specification

Note that when the netmask contains trailing octets containing all zeroes, you can simply leave them off and use a simple partial IP address.

An example would be 172.0.0.0 through 172.0.0.255, which could be specified as a partial IP address as:

Deny from 172.0.0.

For more information, do a search for "netmask" and "CIDR." There are also several online netmask and CIDR generators avaialble. In addition, if you look up your problem IP addresses in ARIN, the CIDR value is often given in the data record containing that IP address.

Unfortunately, this is as simple as it gets.

Jim

Last saved: 05/20/2007
Links: /computers/unix / netmask.txt

How to unlock the Nokia 6101b

#pw+229145642711766+7#
_______________
Remove sim first, power on, press #
Press * 3 times fast for (p)
Press * 4 times fast for (w)
Press * 2 times fast for (+)
Verify code before pressing the last #.
"Code error", don't try again!!
"Phone restrictions off", it's unlocked!!

from another site:
xr3al

#pw+237145655553553+7#
[ + quote]
Remove Your Sim Card, Power The Phone On
Press # From The (Insert Sim) Screen
Enter codes WITHOUT spaces.
Press * 3 times fast for (p)
Press * 4 times fast for (w)
Press * 2 times fast for (+)
Verify code before pressing the last #

more stuff:
FREENOKIA
Imei: 357064-00-334221-4, MccMnc: 310-20, Asic: 2
Provider: T-Mobile;U.S.A.
#pw+ 219 115 337 743 024 +1#
#pw+ 086 863 307 470 475 +2#
#pw+ 718 840 630 600 552 +3#
#pw+ 356 116 777 423 020 +4#
#pw+ 083 533 702 117 744 +5#
#pw+ 115 224 736 364 435 +6#
#pw+ 043 263 761 164 473 +7#

Last saved: 01/20/2007
Links: /computers / unlock-nokia6101b.txt

Lame settings for Audible AA files

. OK, Audible files are low quality relatively and they have four different formats

So the best mappings appears to be these settings from afterdawn
Audible Format Audible Khz
Format 1 Mono 8Kbps proprietary
Format 2 Mono 16Kbps proprietary
Format 3 Mono 32Kbps proprietary
Format 4 Mono 11KHz 32Kbps CBR MP3 format wrapped by Audible DRM

Many folks by the way are using Goldwave and MP3PO from Nerdex to do this. It was designed to take big MP3 files and split them. I probably will keep using MP3Directcut for this mainly because I know how to use it.

Given this, the right setting would seem to be format 4 and then the lame settings would be given the many lame switches

_lame -m m --highpass 11 --mp3input -abr 32

However, if you are using DBPowerAmp, its interesting to note that if you don't supply any parameter at all (!!!), it appears to work about right. Somehow the thing figures everything out and you have about the same length .mp3 as .aa. Wow!

Last saved: 01/20/2007
Links: /computers / lame-settings-aa-files.txt

How to have public and private image areas in Drupal

Submitted by david on Thu, 29/09/2005 - 14:23.

One concern when using the Upload Image plugin is that all of the images embedded in articles will show up in browsable Image Galleries. This is how to set up Drupal to avoid this.

This main thing to grasp is that when you create a new image gallery through the Image module, it creates for you a new taxonomy category in Drupal for you. However the reverse is not true - a taxonomy category for images created in Drupal does not show up in the Image Galleries.

Thus to create a ‘private’ upload directory for images, just go to Admin->Categories and create a new taxonomy - say Private, and set it to apply just to nodes of type Image. Then add a category to that taxonomy - say Images.

Now you will find that when you use the UploadImage module, you can select the Private/Images category and upload images to it without it showing up in the image galleries. Similarly, you can hide images created using the Create->New Image node creation facility.

Note: If you are using a Site Map module such as SiteMap or SiteMenu, you should add your Private taxonomy to the list of those that the site map should ignore or omit.

Last saved: 01/14/2007
Links: /computers / drupal-private-images.txt

Apache mod_rewrite

I set up a new Drupal site, and once it was up and running on the hosting server which already had mod_rewrite enabled, I set it up to use mod_rewrite to clean up the URL presented in the address bar so that addresses would not appear with a ?q= in the address. In order to have a backup system running on my laptop, I had to figure out how to enable the same thing myself on my powerbook.

First thing to do was alter the /etc/httpd/httpd.conf file

Both of these critical lines were already not commented:
LoadModule rewrite_module libexec/httpd/mod_rewrite.so
AddModule mod_rewrite.c

There was already a section which defines RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]

I changed the DocumentRoot to point to /Users/in8/Sites from what I had it set for because I wasn't sure how I would be able to reference my tdb2 directory from the default /Library/WebServer/Documents directory. (It is a subdirectory of my home Sites directory)

I added a new Directory pointing to my tdb2 directory which allows .htaccess files to override settings (that's where I'll do the rewrite) Order allow,deny
Allow from all
AllowOverride All

I'm running Apache/1.3.33 Server at 10.0.1.3 Port 80,
My tdb2 directory has a .htaccess file with the following which does the magic. RewriteEngine on
RewriteBase /tdb2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Last saved: 01/14/2007
Links: /computers / apache-rewrite.txt

Configure php 4.4 on OS X with GD support

Never did bother to figure out why I couldn't get GD to work when I compiled it in 2005, and looks like I may have forgotten to add these libraries in Nov. 2006 when I apparently compiled 4.4 again, and now I need it to make Drupal function properly with images.

It relies on the following libraries, which I didn't have, so used fink to get them.
shell> sudo /sw/bin/fink install libjpeg
shell> sudo /sw/bin/fink install libtiff
shell> sudo /sw/bin/fink install libpng (this one it couldn't find)

Grabbed zlib source (it's not in fink either)
http://prdownloads.sourceforge.net/libpng/zlib-1.1.4.tar.gz
and make, make install

I still had php source in /source/php-4.4.0

./configure --with-zlib-dir=/usr/local --with-libjpeg=/sw --with-libtiff=/sw --with-gd --with-mysql=/usr/local/mysql --with-xml --with-apxs --enable-mbstring
(note: I get an error in phpMyAdmin if I don't use that last one)

sudo make
sudo make install

[in8spbook:/source/php-4.4.0] in8% sudo make install
Password:
Installing PHP SAPI module: apache
[activating module `php4' in /private/etc/httpd/httpd.conf]
cp libs/libphp4.so /usr/libexec/httpd/libphp4.so
chmod 755 /usr/libexec/httpd/libphp4.so
cp /private/etc/httpd/httpd.conf /private/etc/httpd/httpd.conf.bak
cp /private/etc/httpd/httpd.conf.new /private/etc/httpd/httpd.conf
rm /private/etc/httpd/httpd.conf.new
Installing PHP CLI binary: usr/local/bin
Installing PHP CLI man page: usr/local/man/man1
Installing PEAR environment: usr/local/lib/php
[PEAR] Archive_Tar - already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR - already installed: 1.3.5
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] HTML_Template_IT- already installed: 1.1
[PEAR] Net_UserAgent_Detect- already installed: 2.0.1
[PEAR] XML_RPC - already installed: 1.3.1
Installing build environment: usr/local/lib/php/build
Installing header files: usr/local/include/php
Installing helper programs: usr/local/bin
program: phpize
program: php-config
Installing man pages: usr/local/man/man1
page: phpize.1
page: php-config.1

OK, so the install puts php in /usr/local/bin! That explains some stuff. To see which php is the default:

[in8spbook:/usr/local/bin] in8% which php, but it returns:
/usr/bin/php
So I rename the old one
in8spbook:/usr/bin root# mv -f php php.Nov06
and link to the new one
in8spbook:/usr/bin root# ln -s /usr/local/bin/php ./php

and check the version
in8spbook:/usr/bin root# php --version
PHP 4.4.0 (cli) (built: Jan 7 2007 17:39:02)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Checked and this line was already in /etc/httpd/httpd.conf:
AddType application/x-httpd-php .php
(that was already there)

but phpinfo still shows the build from Nov. 1, 2006!

Says to copy /apps/php-4.3.4/php.ini-dist to /usr/local/lib/php.ini
but my php.ini is not there!
File (php.ini) Path /private/etc/php.ini (and that one works OK)

OH! Forgot to restart apache (System Prefs | Web Sharing)

Last saved: 01/07/2007
Links: /computers/mac / php-configure-gd.txt

htaccess file for in8sworld to screw spammers

RewriteEngine on
RewriteRule ^notes/?(.*)$ cgi-bin/journal.cgi$1

SetEnvIfNoCase Referer 209.8.22.250 spammer=yes
Order allow,deny
allow from all
deny from env=spammer

deny from 64.71.131.110
deny from 64.127.124.
deny from 205.178.145.65
deny from 209.8.22.250

order allow,deny
allow from all

ErrorDocument 404 /blog/index.php?error=404

RedirectMatch temp ^/$ http://www.in8sworld.net/blog
RedirectMatch temp ^backend/in8sworld.rss$ http://www.in8sworld.net/blog/index.php/feed
RedirectMatch temp ^/blog/cgi-bin/lyrics.cgiindex.html$ http://http:in8sworld.net/cgi-bin/lyrics.cgi~

Last saved: 01/07/2007
Links: /computers/unix / htaccess-070107.txt

htaccess file for in8sworld

RewriteEngine on
RewriteRule ^notes/?(.*)$ cgi-bin/journal.cgi$1
RewriteRule ^backend/in8sworld.rss(.*)? blog?feed=rss2

order allow,deny
allow from all

ErrorDocument 404 /blog/index.php?error=404

deny from 64.71.131.110
deny from 64.127.124.
deny from 205.178.145.65

RedirectMatch temp ^/$ http://www.in8sworld.net/blog

Last saved: 12/31/2006
Links: /computers/unix / htaccess-061231.txt

VIM replace all extraneous ^M:

:%s/^M$//g

BE SURE YOU MAKE the ^M USING "CTRL-V CTRL-M" NOT BY TYPING "CARROT M"! This expression will replace all the ^M's that have carriage returns after them with nothing. (The dollar ties the search to the end of a line)

Last saved: 12/21/2006
Links: /computers/unix / vim-hatM.txt

Print backgrounds in FF on Mac

In Firefox, go to File > Print > in the Print dialog, use the third popup menu from the top to set all your options the way you want, including Firefox > Appearance: check Print Background Images and check Print Background Colors.

Now, look at the second popup menu from the top of the Print Dialog box, marked Presets:. If you want to save this as the Preset that you are currently on, click that Presets popup and select Save. If you want to create a new Preset, click that Preset popup and select Save As, and give it a new name.

Last saved: 12/21/2006
Links: /computers/mac / printFF.txt

Command line mysql backup and restore

# make a backup (http://dev.mysql.com/doc/mysql/en/mysqldump.html)
# capitalizations represent your database information

shell> mysqldump -h HOST -u USER -p --opt DATABASE TABLE > search.sql

# import a backup (http://dev.mysql.com/doc/mysql/en/mysql.html)
# capitalizations represent your database information

shell> mysql -h HOST -u USER -p DATABASE < search.sql

Last saved: 12/19/2006
Links: /computers/unix / mysql-backup.txt

Where is that php.ini again?

I seem to forget this every time I need it. Today I needed it to increase the file size that phpmyadmin will accept (to import a backup file). I found I'm using the:
/private/etc/php.ini file (This is a Mac), and the line I had to change was:
; Maximum allowed size for uploaded files.
upload_max_filesize = 8M
(it was originally on 2M)

Last saved: 12/19/2006
Links: /computers/mac / php-filesize.txt

Email sent to Tim Bishop and Hillary Clinton

TOPIC: Net Neutrality

I am an IT person for a small manufacturing company, and I have spent most of my life around computers. I cannot in good conscience fail to speak out about this topic because I understand the issue better than many of my peeers.

I realize you are in the minority party in Congress, but please do all you can to educate yourself and others about the importance of keeping large corporations honest regarding this issue - there has been a lot of misinformation spreading lately. If you have a few seconds (on the internet ;) please read this short post by Tim Berner's Lee (the inventor of the world wide web) on the subject: http://dig.csail.mit.edu/breadcrumbs/node/144
which makes the case very clear that we need at least some minimal regulations.

Why should you care?
Because control of (mis?)information is what is keeping the republicans in a majority for one thing, but more importantly - our democracy depends on the free exchange of information. If huge corporations can control what information I have access to and what information I can provide as a citizen to others, we will have handed the greatest technological (and social) invention of all time over to the whim of the very few, stifling creativity, invention, and possibly eroding our very democracy.

Last saved: 06/22/2006
Links: /computers / netneutral.txt

Upgrading a network with non-microsoft OSS

Slashdot article
http://ask.slashdot.org/article.pl?sid=05/05/16/132238&tid=164&tid=185&tid=201&tid=4

Symantec CCM - $140/seat
(was: ON Command CCM 4.5)
Enterprise level sw

Altiris RapidInstall - $295/25 users
no uninstall

MAKEMSI 05.119 - free??
http://www.labyrinth.net.au/~dbareis/makemsi.htm (old)
updated 6/1/06 --> http://users.cyberone.com.au/dbareis/makemsi.htm (new)
then use group policy to deploy

Frontmotion?

Mozillazine MSI instructions
http://forums.mozillazine.org/viewtopic.php?t=138033

Winstall LE - $49.95
http://www.ondemandsoftware.com/PurchaseLE.asp

App deploy site
http://www.appdeploy.com/video/

Last saved: 06/01/2006
Links: /computers/windows / upgrade-management.txt

Alternate DNS servers

Verizon (Level3) Nameservers
4.2.2.1
4.2.2.2
4.2.2.3
4.2.2.4
4.2.2.5
4.2.2.6

SpeakEasy Nameservers
66.93.87.2
216.231.41.2
216.254.95.2
64.81.45.2
64.81.111.2
64.81.127.2
64.81.79.2
64.81.159.2
66.92.64.2
66.92.224.2
66.92.159.2
64.81.79.2
64.81.159.2
64.81.127.2
64.81.45.2
216.27.175.2
66.92.159.2
66.93.87.2

ORSC Public Access DNS Nameservers
199.166.24.253
199.166.27.253
199.166.28.10
199.166.29.3
199.166.31.3
195.117.6.25
204.57.55.100

Sprintlink General DNS
204.117.214.10
199.2.252.10
204.97.212.10

Cisco
128.107.241.185
192.135.250.69

Last saved: 04/11/2006
Links: /computers / dns-servers.txt

Boot Camp for OS X

Boot Camp will please Microsoft enough to keep pimping their VirtualPC for a while for the Mac-fans, and they can sell legal copies of Winblows to that small group of folks that otherwise probably wouldn't have bought it. But besides some folks who want to boot up in Win to play a game, I think this is really not all that big a deal. You still can't run Windows apps under OSX, or share files across the installations (although it's not mentioned, Windows probably won't be able to see the HFS filesystem, though the Mac might be able to write to NTFS in some lame way). What to really watch out for: when Apple releases a $99 OSX to run on all the existing 32 bit PC hardware currently out there, allowing everyone in the world to trade in their previous administrative headaches for a real, beautiful, and civilized experience. Vista has been postponed (again) and Microsoft is suggesting that admins work up plans to wipe machines automatically when they become infected. Now there's a good solution to all the security holes in Windows! HAHA!

Since all the games I like run fine on my 1.5GHz Powerbook, I have no need to upgrade it. My next machine will likely be PC hardware though, but to run Linux or BSD, certainly not Windows.

Last saved: 04/09/2006
Links: /computers/mac / bootcamp.txt

Logging in to CVS and adding a new module

cvs -d :pserver:user@domain.org:/usr/local/projects login

cvs import -m "Example" example exampledev ex_0

Last saved: 03/06/2006
Links: /computers/cvs-stuff / cvs-login.txt

Notes from Asterisk

If the Internet had been thusly hampered by regulation and commercial interests,it is doubtful that it would have developed the wide acceptance it currently enjoys. The openness of the Internet meant that anyone could afford to get involved. So, everyone did. Thetens of thousands of minds that collaborated on the creation of the Internet delivered something that no corporation ever could have.

from Asterisk - The Future of Telephony by Jim Van Meggelen, Jared Smith, and Leif Madsen Copyright © 2005 O’Reilly Media, Inc. All rights reserved.

Last saved: 01/30/2006
Links: /computers / asterisk.txt

Vi Word Count
from here

A better use of filters comes to mind, and that's to get a word count of the document (1752 words and counting!). To do this type:
:%!wc
This will display a group of three numbers like, "206 1765 9995" (and pretty much nothing else). These numbers indicate the number of lines, words and characters. To get the document text back press 'u'.

Last saved: 01/20/2006
Links: /computers/mac / vim-wordcount.txt

Powerbook won't wake from sleep?

I have been having the same problem (intermittently) that this blogger describes. This morning as I opened the case top, I noticed the sleep light was off and I knew what awaited me: the screen was black and no combination of key presses would bring it to life. However, the machine was definitely on and running hot, the fan was on which rarely ever comes on. The aluminum near the Esc key was hot to the touch. I looked in /var/log/system.log and found the following entries at about 4am even though I had put the machine to sleep at midnight and was fast asleep at 4am:

Jan 14 04:10:34 localhost kernel: handleAirPortChangesChannelWL fails because POWER IS OFF (the mask is correcty set however)
Jan 14 04:10:34 localhost kernel: System Sleep
Jan 14 04:10:34 localhost kernel: System Wake
Jan 14 04:10:34 localhost kernel: Wake event 0020

The blog entry I found pointing me to the Energy Saver Prefs is linked here:
http://www.n3wb.com/boolean/archives/2005/05/more-system-weirdness/
it's quoted below

"I was sitting in my room last night, playing a video game, I think, when I heard a ping from my PowerBook sitting on the shelf next to me. I looked over and saw that the sleep light was no longer on, so I opened it up and 'lo, it was awake and prompting me for a password. But not for long… The screen went black, despite the LCD and keyboard backlights still being on and responding to keyboard control. I was able to SSH in and shut it down from the command line.

On reboot, I checked the system log and found a line containing:

Wake event 0020

Searching around with Google didn't tell me much about it other than it's been around for awhile and affects some people fairly frequently.

I disabled "Wake for ethernet administrator access" and "Wake when the modem detects a ring" in Energy Safer prefs. I haven't had a "wakeup call" since last night."

Last saved: 01/14/2006
Links: /computers/mac / wake-from-sleep.txt