User login

how to

Get a past version of your project with Git

git checkout old version
git get old copy
git branch checkout revision

http://stackoverflow.com/questions/849265/do-you-need-to-create-a-branch-to-check-out-a-specific-git-revision

basic git commands

Benchmarking Drupal

How to benchmark Drupal

Benchmarking Drupal code
http://drupal.org/node/79237

catch benchmarks
http://civicactions.com/blog/2009/feb/10/profiling_drupal

Increase File Attachment Size Limit in Trac

sudo vi /etc/trac/trac.ini

Updated the attachment max size line to this:

[attachment]
max_size = 5242880

This made it 5 MB (I just multiplied their number of bytes, which equaled 250Kb, by 20).

Reference

http://trac.edgewall.org/wiki/0.11/TracIni

Trac administration with real examples

Run trac-admin commands on the server hosting the trac sites. In our Debian server setup at least, individual projects are in the /srv/trac/ directory, and every trac-admin command should be followed by the path to the project you care about.

For more information than man will give you, use:

trac-admin help

To make a user an admin (I believe this will automatically create a new user if it has to) --

trac-admin /srv/trac/example permission add username TRAC_ADMIN

Using Module Builder via Drush

Prep

Note: A couple things are specific to my local development environment, the location of the site code of course but also that development modules are maintained in their own directory and symlinked into local checkouts of sites (this keeps development-oriented modules out of code that is deployed to production).

Thus, prepping the module builder code looked like this for me, including symlinking the dev code in, which is usually already done for me by the checkout script:

Automatically test a patch in Drupal 7

Script to make testing a patch for the current version of Drupal Head really easy.

Easiest way to get into a development Drupal site you are locked out of

Edit index.php and right below the first real code line, the bootstrap call, add:

<?php
global $user;
$user->uid = 1;
?>

Refresh any page once, and you are the superuser.

Do not ever do this on a production site as anyone who happens along is made user number one whether they want to be or not.

searched words: user login uid 1 one locked out get in log in forgotten password e-mail not emailing account information cannot sign in help I'm an administrator how did i do this

SSH agent forwarding

See http://data.agaric.com/node/107 for the right way.

For having your public key somehow let you be able to use your repositories and stuff. It's good magic.

.ssh forwarding agent forward ssh-agent

goes in /home/username/.ssh/config

An example:

Using mod_header to force file downloads

The file_force module offers a solution to the problem of offering download links to nimages and other file types that are otherwise displayed in a browser. As the maintainer of the module states it is not the best solution as it redirects access to static content through a php script. He suggests using a webserver based solution; here is one using Apache's mod_header setting the Content-Disposition header in a given context:

Syndicate content