Wednesday, July 14, 2010
Just learned about the chrome://plugins/ feature for chrome browser. Works on Mac too!
Saturday, June 26, 2010
Windows 7 Undock and Hibernate
New job has me using Windows 7 on a laptop. It seems less stable than Windows 2000. It has an undock feature on the "shutdown" menu. The problem is that 90% of the time I undock, I also want the laptop to hibernate. The other 10% of the time I want to undock to carry my laptop to a meeting. There is no "undock and hibernate" option separate from the plan undock on the menu. To do it properly you would have to undock, pop open the laptop and select hibernate. A real pain...
So thinking like a unix user, I figured there must be a way to do this on the command line. And here we go a short bat file to undock and hibernate. Copy the following lines and put them in a file. I called it gohome.bat.
So thinking like a unix user, I figured there must be a way to do this on the command line. And here we go a short bat file to undock and hibernate. Copy the following lines and put them in a file. I called it gohome.bat.
Hibernation has to be enabled for the last line to hibernate. Now I just double click the bat file on my desk top, and I'm off.
: This Undocks
C:\Windows\System32\rundll32 cfgmgr32.dll,CM_Request_Eject_PC
:: Then we Hibernate
C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
Friday, March 26, 2010
Compressing or Removing Old Logs
The following is useful for compressing or removing files based on name.
find $path -name "$LogFileRegEx" -exec $compress_rm {} \; & And this works for removing files based on age.
find $path -mtime $DaysToOld -exec rm {} \; And they can be combined if needed.
Tuesday, February 16, 2010
Make Eclipse faster on Mac OS X
Copied from my other blog: pwbrewer.blogspot.com
Taken from this page on eclipse.dzone.com.
To that I would add the server option to the same file:
And I suggest changing the following settings:
Taken from this page on eclipse.dzone.com.
After you downloaded the Eclipse package, decompress it. Locate your Eclipse.app.
Right-click it and select Show Package Contents.
Under Contents/MacOS, locate the eclipse.ini file. Open it with a text editor.
At the end of the file, add two lines:-XX:+UseParallelGC
-XX:+UseCompressedOops
Save and close the file.
To that I would add the server option to the same file:
-server
And I suggest changing the following settings:
--launcher.XXMaxPermSize
256m
-XX:MaxPermSize=256m
-Xms64m
-Xmx512m
Tuesday, December 01, 2009
WHERE IN - MySQL
My attemps to confirm this in the MySQL documentation turned up no hits. However the following does work in MySQL.
mysql> delete from vendors where key IN (13, 2);
mysql> delete from vendors where key IN (13, 2);
Monday, October 05, 2009
Scrum Video
I found this video on Scrum very interesting. If you aren't experienced or only marginally experienced with Scrum you should invest the hour of time and watch it. It is a recording of a presentation at Google, hosted on YouTube and titled "Scrum et al."
Monday, September 14, 2009
Browsing MySQL from Command Line
To view a MySQL schema from the command line, use the commands show databases;, show tables; , and describe . See the following example:
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| email |
| elggDB |
| wikiDB |
+--------------------+
4 rows in set (0.00 sec)
mysql> show tables
-> ;
+------------------+
| Tables_in_email |
+------------------+
| access_sender |
| alias |
| transport |
| user2domains |
+------------------+
4 rows in set (0.00 sec)
mysql> describe alias
-> ;
+----------+------------------+------+-----+
| Field | Type | Null | Key |
+----------+------------------+------+-----+
| id | int(11) unsigned | NO | PRI |
| username | varchar(128) | NO | |
| domain | varchar(128) | YES | |
| enabled | enum('Y','N') | NO | |
| goto | varchar(128) | NO | |
| notes | varchar(255) | YES | |
| updated | timestamp | NO | |
+----------+------------------+------+-----+
7 rows in set (0.00 sec)