I've got a Raspberry Pi with which I'm using OS X's Internet Sharing.
Since the RPi's uses DHCP by default,
but mDNS is turned off by default
it takes a little magic to figure out which IP address the RPi is using.
That magic is this command:
arp -i bridge0 -a
You'll probably see a very low IP address such as
192.168.2.3
You can then log into the RPi and turn mDNS on so that you don't have to remember the IP address like so
sudo apt-get update
sudo apt-get install avahi-daemon
# and check the hostname too
hostname
Afterwards you can find it via mDNS
ssh pi@raspberrypi.local
At OpenWest I gave a talk with the following title and description
Getting Started with PHP
A brief introduction to the business need and then diving into
getting started and best practices before you get
engrained down the long path.
For developers and also very useful especially businesses owners
and recruiters.
Don't come if you already know Ruby / Rails, Python / Django,
or NodeJS / Express.
Slides on Google Docs
The purpose of the talk was to suggest to people looking to
start using PHP that they use something else, but if they
want to use PHP anyway to suggest a few tools and best practices
to avoid pitfalls.
Indeed, the talk was intended as a bait and switch
(as alluded to in the description),
to catch people who weren't yet much involved with PHP,
and entice to use something else.
By not even trolling I don't mean that I won't troll PHP,
but that this is a legitimate help resource.
Installation
The great news is that with PHP 5.4+ it can run a self-contained web-server
that can behave just like Python, Ruby, or other programming languages.
Depending on the OS, it may be a little more hassle to install:
For OS X head on over to http://php-osx.liip.ch/.
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.4
echo 'export PATH=/usr/local/php5/bin:$PATH' >> ~/.profile
echo 'export PATH=/usr/local/php5/bin:$PATH' >> ~/.zshrc
Note: You'll need to exit Terminal and reopen it.
php -v
For Ubuntu Linux see http://www.zimbio.com/Ubuntu+Linux/articles/D_AsJR2qAL6/How+Upgrade+PHP+5+4+Ubuntu
sudo add-apt-repository ppa:ondrej/php5
suda apt-get update
sudo apt-get install php5
For Windows try the
PHP for Windows and
see the notes
Your first PHP app
The Installer Trifecta Series
TLDR
If you're the intelligent and impatient type:
Skip down to Building the deb and see the final steps
and then glance back up at Getting Started
to see the directory structure.
Why .deb?
Two words: Double Click.
Although I could cite angry flame wars on the topic of
installing via curl installer.com | bash is evil,
I like that method just fine.
In reality, it's just as secure as a foreign .deb.
However, from the end-user perspective,
a double-click installer is "more legit".
The best news is that
Debian installers (.debs) are actually incredibly simple
(vim, tar, and ar are all you need)
and the Linux (GNU / OpenDesktop, actually) desktop architecture
is also really coherent.
I've created tutorials complete with screencasts that show how to create
an installer for the HelloNode demo app.
See how to
Each of these tutorials shows how to
- Create the installer
- Register the NodeJS App as a system service
- Create a desktop icon that opens your app in Chrome's App Mode