User login

Stefan Freudenberg

Manual update of git-deployed Agaric production site

For a project named (and with the repository and server user name) 'example'.

ssh example@sojourner.mayfirst.org
cd example
git pull

For the git pull to work your public key must be in /home/vlad/.ssh/authorized_keys on the test server (simone.mayfirst.org). You can get this value from /home/yourusername/.ssh/authorized_keys. (@Stefan can we in some way give people with access to simone access to use it as the vlad user automatically?)

Building Beauty presentation documentation and links

The Site

  • http://daniel-libeskind.com/
  • Horizontal continuum for all sections
  • Press request and access functionality with Organic Groups
  • Complex, structured project content type
  • News, press releases, etc.
  • Events listing
  • About Daniel Libeskind section, including sub-project listing with galleries
  • Project, one-by-one galleries
  • PDF Generator
  • Mobile version ...including for BlackBerry

Re-starting the Ruby bot

Stefan graced the Agaric chat room with a Ruby bot that reports when commits are made. Sometimes it stops working (tries to rejoin the chat room, dies immediately) and it can be fixed by ending the Ruby process and starting it again.

ssh simone.mayfirst.org
sudo su
su stefan
top  # identify the ruby process or processes (PID), for this say it is 12345
kill -9 12345
rbot & disown

CTags and Vim

Thanks in part to
http://sachachua.com/blog/2008/07/eclipse-to-emacs-navigating-your-source-tree/

Set-up:

(If not already installed: sudo apt-get install exuberant-ctags)

ctags -R -f ctagstags --languages=php --langmap=php:.module.php.inc.engine.profile .

In .vimrc,

set tags=ctagstags;/

In .bashrc

Installing NetBeans 7 on Ubuntu 11.10

Install the prerequisites via the command line:

sudo apt-get install openjdk-7-jdk openjdk-7-jre

Note: This will take a while and you will have to respond yes ("y") to the questions.

Then download Netbeans from their site and run the installer. We use the PHP only version.

Note: the installer will probably be located in /home/[username]/Downloads. To run you may need to cd to the Downloads directory, change the permissions using the chmod command, and then run with "./[installer_name]".

Updating your Rakefile and syncing content

As when working on any Agaric project that may not have had maintenance done on it in a while, update the Rakefile to be in line with current processes.

First, make sure your Vlad checkout is up-to-date. Go to it cd ~/vlad (in my case, i symlinked Vlad's true location to my home folder so he can find it. On my system Vlad's true location is /usr/local/lib/site_ruby/1.8/i686-linux/vlad/) and git pull.

cd ~/code/projectname
mv Rakefile RakefileOLD
cp /home/ben/vlad/Rakefile Rakefile
diff -up

Enhance your prompt with git information

Git provides a series of enhancements for the bash prompt. It can display the current branch when inside a working copy. Here's an example from my machine:

stefan@debian:~/Documents/Projects/Drupal/test(master *)$

It shows the branch name and indicates by an asterisk that I have uncommitted changes.

Using directory-reserved paths in Drupal

[There is no current general resolution to using directory-reserved paths, but it's surely possible with custom Apache rewrite rules-- apparently everyone concludes (as i am right now) that it's not worth the effort!]

Partial Resolution

To .htaccess, add:

    # Allow the modules path to be used by Drupal for the modules chapter.
    RewriteCond %{REQUEST_URI} ^/modules/?$
    RewriteRule ^ index.php [L]

Scaling and Performance consulting

Stefan's recommended approach:

For performance consulting, begin by asking whether they have high server load or just slow page loads. In the latter case we must first find out if it's the server or something else yslow can tell you.

In the case of high server load you should ask for the slow log. It would be nice if they had monitoring data for cpu ram and so on. Don't ask for full access to the data first. Some companies are really cautious about that and it's not necessary to get access for a starter.

Syndicate content