User login

How to

Information on how to do something... anything.

Putting a local project maintained in git on a server as a central repository

Note: The agaric git repository is not public, but this approach will work on your own server.

Stefan explained: copy your folders to your home dir on the server, cd to /srv/git and then run git clone --bare folder folder.git

cd ~
scp -r customhome

On the server:

ben@server:/srv/git/agaric$ git clone --bare ~/customhome customhome.git

Initialized empty Git repository in /srv/git/agaric/customhome.git/

And don't forget!

See your git commit history with files modified

Git log shows you all your commit messages and the revision hash, but often git log would be more useful showing files changed. (You should still try to write commit messages as if the reader will have no context except, at best, the project itself.)

git log --name-only -5

Link to twitter status message from Drupal twitter module repost

Link twitter status messages to the twitter account display of these status messages.


Edit the view Twitter module created at admin/build/views/edit/tweets. For Agaric's purposes in this case we chose to edit the default settings for the view (the "Tweets" display).

Add the fields:

Twitter: Login name Login name
Twitter: Status ID Status ID

For both, select "exclude from display".

How to restart Drupal bot (and wish to automatically restart)

The first start

cd /home/members/agariclabs/sites/
php bot_start.php --root /home/members/agariclabs/sites/ --url

Older discussion about restarting below (uses test server paths)

To restart your friendly neighborhood drupal bot when it no longer responds to commands, first kill the zombie bot for real.

When you kill it, the bot disappears from the channels so you don't have to kick it out, and the re-started bot will be able to claim its proper name.

Adding (verifying) your Drupal site to Google's Webmaster Tools

I don't see an API for your entire Google account coming soon, or Google should already be able to skip the verification step for sites using Google analytics.

So the easiest way is to make a new node or create a new path alias to an existing page with the path that google wants: googleed909f3ff5bcb87e.html in this case.

And delete it afterward.


Checkout a specific revision of a file with Git

git checkout abcde file/to/restore


How do I reset/revert a specific file to a specific revision using Git?


Having the top-level menu items not be links (for use with dropdown menus)

The best approach may be to avoid this entirely with proper information architecture. I always try to make these have meaning themselves, but certainly with not expecting most people to click on them anyway, this does not always make sense. Instead, the way Agaricer Kathleen did it for one project is simply to have each dropdown be a separate menu.

But let's say you are stubborn and don't like that approach or are too far down the path of a big old nested primary links menu. What do you do? Call Agaric, of course (or find this web page).

Unset certain values in an unkeyed PHP array

Can't be as complicated as these people make it out to be?

One of Agaric's approaches, below. This foreach allows one to unset just one validation function associated with a form (and adds another one below) without replacing or overriding any other validation callbacks that might be associated with the form (by the initial or other modules).

Undo a conflicting change in your working copy that you didn't want anyway

In short, resolve a conflict in favor of the outside repository.

The file can be a

mv offending.file ~/elsewhere
git checkout offending.file

See also for resetting everything:

Syndicate content