Pages

Tuesday, May 31, 2011

ssh-keygen instructions for windows (tortise, putty, winscp, etc)

The gist of it is.  

Create a public/private key in linux using ssh-keygen

Move the private key to authorized_keys in the .ssh folder

Move the private key to windows.

Use puttygen to load the existing private key (from linux) and save the private key (in the windows key format).

Use pageant to load the keys.  Then putty, winscp, tortise will use pageant as a key proxy and not more passwords.

http://linux-sxs.org/networking/openssh.putty.html


 


Saturday, May 28, 2011

Commandline to samba mount linux to a windows share

I've had challenges with in the past getting a mount to work.  The following seems to work without any special consideration in the windows share.  This is especially good because it forces the linux folder to use the user and group so not special consideration is required in apache.

NOTE: /sbin/mount.cifs is a linux command, not a custom shell script.

This is mounting a windows shared folder named "project" to "/var/www/html/project".  The files in linux will all be 666 and the folders in linux will all be 777.  You can customize this.

/sbin/mount.cifs //{YOUR WIN IP ADDRESS}/project /var/www/html/project -o 'uid={YOUR LINUX USERNAME},gid=apache,sockopt="TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192",dir_mod=0777,file_mode=0666,noperm'

Put this in a shell script or an alias and it is quick, easy, and reliable.

Sunday, May 15, 2011

Python count files in dirs program; better ls | wc -l (word count)

#!/usr/bin/python

import os
from os.path import join, getsize
for root, dirs, files in os.walk('.'):
    print root, "consumes",
    print sum(getsize(join(root, name)) for name in files),
    print "bytes in", len(files), "non-directory files"

Wednesday, April 27, 2011

Setting up xamp environment with netbeans, mercurial, and Zend Framework

Install mercurial for windows for NetBeans integration

Add mercurial bin directory to the windows path

Add xampp php to the windows path

Add the Zend Framework bin folder to the windows path

Execute zf tool commands from the windows powershell

zf create project zend-sample

Add the following to the httpd-vhosts.conf (and uncommment the NameVirtualHost line)

<VirtualHost *:80>
ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "C:\Users\matt\Documents\NetBeansProjects\zend-sample\public"
ServerName zend-sample
ServerAlias www.zend-sample
ErrorLog "logs/zend-sample-error.log"
CustomLog "logs/zend-sample-access.log" combined
<Directory C:\Users\matt\Documents\NetBeansProjects\zend-sample\public>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Add to the hosts file:
127.0.0.1 zend-sample www.zend-sample

Add the zend framework library path to the include_path in the php.ini

Restart apache

Add the .hgignore
nbproject

In netbeans add the zend framework library to the include path

Gift Tax Limitiations


What if my spouse and I want to give away property that we own together?
You are each entitled to the annual exclusion amount on the gift. Together, you can give $22,000 to each donee (2002-2005) or $24,000 (2006-2008), $26,000 (effective on or after January 1, 2009).

Wednesday, April 13, 2011

Sunday, April 10, 2011

Magic Trackpad for Windows


Download this patch (available for Windows 32-bit and 64-bit)

7-zip and extract the contents of the exe

"BootCampUpdate32.msp" – extract the contents of this file

will have a file called "Binary.AppleWirelessTrackpad_Bin" – just add a .exe extension to this file and then double-click to run it.