Friday, November 6, 2015

Cakephp - htaccess - godaddy - how to make it work!

If you are hosting a cakephp application in a sub-directory of godaddy (why would you?).
You can also host multiple cakephp app domains in this way.
Put this .htaccess file in your html directory:

RewriteEngine On
Options +FollowSymLinks -MultiViews -Indexes

RewriteCond %{HTTP_HOST} ^(www\.)?example1\.com$ [NC]
RewriteRule ^(.*)$ /var/chroot/home/content/11/11111111/html/example1/webroot/$1 [L]

RewriteCond %{HTTP_HOST} ^(www\.)?example2\.com$ [NC]

RewriteRule ^(.*)$ /var/chroot/home/content/11/11111111/html/example2/webroot/$1 [L]

The .htaccess files inside the example1 and example2 subdirectories are the standard configurations.




Monday, February 24, 2014

CakePHP - multiple projects on one Apache and CakePHP core

CakePHP - get multiple projects working on apache.
If you want to run two cakephp projects on one instance of Cake core, and apache, here is some useful info:

Edit - /etc/apache2/extra/httpd-vhosts.conf 
Add the following:

    ServerAdmin webmaster@one.local
    DocumentRoot "/Users/d/Documents/project/one/webroot/"
    ServerName one.local
    ServerAlias www.one.local
    ErrorLog "/private/var/log/apache2/one-error_log"
    CustomLog "/private/var/log/apache2/one-access_log" common

   
      Order allow,deny
      Allow from all
      #Options +Indexes
      Options -Indexes +FollowSymLinks
      AllowOverride All
   

    ServerAdmin webmaster@app.local
    DocumentRoot "/Users/d/Documents/project/app/webroot/"
    ServerName app.local
    ServerAlias www.app.local
    ErrorLog "/private/var/log/apache2/app.com-error_log"
    CustomLog "/private/var/log/apache2/app.com-access_log" common

   
      Order allow,deny
      Allow from all
      #Options +Indexes
      Options -Indexes +FollowSymLinks
      AllowOverride All
   



Now you have the two apps at:
http://one.local/
http://app.local/


Saturday, June 23, 2012

Installing Graphite


I faced all these issues while installing graphite, but I am assuming other apps will have similar issues.

First error that I could not find easy answer for:
[FATAL] Unable to import the ‘cairo’ module, do you have pycairo installed for python 2.6.6?

Solution:
yum install pycairo python-devel

Next error:
[FATAL] Failed to create text with cairo, this probably means cairo cant find any fonts. Install some system fonts and try again

Solution:
yum install bitmap-fonts-compat

--------------------------------
Next when I did /etc/init.d/httpd reload, I got wsgi error

To fix that, step 1:
Make sure you have aspx installed.
If not:
yum install httpd-devel


Now, install mod wsgi
# Install mod_wsgi
mkdir temp/
cd temp/
wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
tar fxz mod_wsgi-3.3.tar.gz
cd mod_wsgi-3.3/
./configure
make
make install
cd ../../
rm -rf temp/


Now: you can do
/etc/init.d/httpd reload

Wednesday, June 20, 2012

adding text to Android emulator's clipboard

For testing apps, it was a pain to copy text from dashboard to paste into Android's EditText. I put this into a shell script adb shell service call clipboard 2 i32 1 i32 1 s16 %*

Friday, February 25, 2011

How much equity to give

Well thought list of things to consider when doling out equity in a startup:

http://groups.google.com/group/lean-startup-circle/msg/a7dd866fda7b66e9

Excerpt:
* How early stage is the startup? Typically, the earlier the greater
equity %
* Do you already have other individuals who are compensated with
equity? If yes, then you know your maximum. VP of sales generally
would get less than the CMO or any other 'C' level executive.
* If you have investors, what do they think?
* How much is left in the options pool? And how many other hires would
you need to make before the next finance round?
* What does your lawyer/accountant think?
* Did you ask the candidate what their expectation is? If you have
several candidates you can compare expectations? Sometimes this can be
a double edge sword but you will get insight into the person's
mindset. And, a VP of sales should be able to handle such direct
questions.
* How crucial will this person be? And how unique are they?
* Will they be getting salary in addition to equity compensation?
Getting paid often reduces equity awards.
* Where is the startup located? Europe is different than the U.S. and
even Silicon Valley differs from NY's Silicon Alley.
* What is your current vesting schedule? Longer schedules are
sometimes offset by a larger payout
* Have you considered alternatives to equity such as bonuses, revenue
share, etc.

Tuesday, January 11, 2011

ant build file for android

a. create a build.xml file
go to root of your project and run
> android update project --path .

create secure.properties file and add to it
key.store=keystore
key.alias=aliasname
key.store.password=password
key.alias.password=password

add to build.xml


create signed package:
> ant release

Friday, January 7, 2011

how to woo bloggers to write about you

http://groups.google.com/group/lean-startup-circle/msg/b2f209aa0483849a

Excerpts:

The Pitch
1) Be Honest about why you're approaching the blogger - ie, we just created
this new xp tracking gizmo and wanted your thoughts about it since you blog
about xp/financial topics. I'd like to give you a free permanent account to
review in your own time.
2) Clearly state your offer - We're in the alpha/beta stage and looking for
feedback so if you'd like to share with your readers we would really
appreciate it. .
3) Try to Establish an ongoing relationship - We definitely appreciate your
time and would like to keep you updated on our progress, if that's ok with
you.

Metrics Tracking
1) Try to use at least 3 different pitch variants to a small sample of
different bloggers (say 24).
2) Track each variant a,b,c
3) Based on which has the most success response, optimize to that variant
and expand the target size.