Pages

Tuesday, May 8, 2018

Saturday, January 7, 2012

Pear compile into MAMP (OSX Snow Leopard)

cd php-5.3.1/ext/imap
make clean
phpize
MACOSX_DEPLOYMENT_TARGET=10.6 \
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" \
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" \
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" \
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" \
./configure --with-imap=/usr/local/imap-2007 --with-kerberos --with-imap-ssl=/usr/

http://www.activecollab.com/forums/post/32919/

Sunday, December 25, 2011

Minimum interest rate on personal loans

http://www.fpanet.org/journal/BetweentheIssues/LastMonth/Articles/LowInterestRatesMakeIntrafamilyLoansAppealing/

Low Interest Rates Make Intra-family Loans Appealing
By Kristi Mathisen and Barbara Potter

The Applicable Federal Rate
The key to transferring wealth through intra-family loans is the applicable federal rate, or AFR. The AFR is the rate at which the loan will be evaluated for both income and gift tax purposes. If a note requires a child to pay a parent no interest or an interest rate that is less than the appropriate applicable federal rate, the transaction will be characterized, at least in part, as a gift from the parent to the child and the income tax effects described above will occur. The caveat is also true. If the stated interest rate is at least the AFR, there is no gift element in the transaction, unless the interest is not in fact paid.
AFRs are determined by the IRS each month.3 The rates vary depending on the term: short-term for obligations due in less than three years, long-term for those due in more than nine years,  and mid-term for everything in between.4 Applicable federal rates are by no means market rates. They are based on the rates for various treasury securities during the previous month. These rates are almost always less than commercial or retail rates and therein lies their great appeal with today's low treasury rates.

Adjustable Federal Rates (IRS)
http://www.irs.gov/app/picklist/list/federalRates.html


Other IRS references
http://www.irs.gov/publications/p550/ch01.html

http://www.irs.gov/publications/p525/ar02.html

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