User login

GNU-Linux

Fix messy Mac-style line endings to have proper Unix text file format

In a vi text editor as reached from the command line shell with vi filename.txt or an excellent GUI such as MacVim, enter:

:%s/\r/\r/g

and your file will be beautiful, even if only parts of it were messed up with ^M non-working line breaks.

Thanks to the comment at this post.

Resolution

Using Drush (experimental release) to add modules from outside a site

sudo ~/drush.experimental.6/drush.php -r /var/www/drupal-6-agaric-core/drupal pm install link

On sharing the command with an esteemed Agaric colleague, I realized that the instructions had to be tweaked slightly... for another person, even if run

Shell commands for untarring (and deleting the archive) a bunch of gzip files

In the process of adding modules Agaric finds useful to Drupal development to a special git repository I did a bit of bash command line scripting that was fun for me:

After a bunch of wget's like:
wget http://ftp.drupal.org/files/projects/schema-6.x-1.3.tar.gz

I ran:

for a in `ls -1 *.tar.gz`; do tar -zxvf $a; done
for a in `ls -1 *.tar.gz`; do rm $a; done

Database user creation and permissions

CREATE USER '6-agaric-core'@'localhost' IDENTIFIED BY '*************';

GRANT USAGE ON * . * TO '6-agaric-core'@'localhost' IDENTIFIED BY '*************' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

CREATE DATABASE IF NOT EXISTS `6-agaric-core` ;

GRANT ALL PRIVILEGES ON `6-agaric-core` . * TO '6-agaric-core'@'localhost';

Resolution

Git profile project in an SVN Drupal site

Note: This approach should be considered deprecated in favor of a pure Git system.

For installing the SCF profile for use as part of an existing site managed in SVN:

Git it:
http://sciencecollaboration.org/node/5

cd profiles/
git clone git@github.com:scf/scf.git
svn propset svn:ignore .git .
svn add scf
"Science Collaboration Framework (scf) profile added."

Disable problem module through the database via command line mysql

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2266274 bytes) in /var/www/example/profiles/scf/modules/contrib/devel/devel.module on line 1377

mysql -u example -ppassword -h agaric.example.edu
mysql> SHOW DATABASES;
mysql> USE example-dev;
mysql> SHOW TABLES;
mysql> SELECT name FROM system;
mysql> UPDATE system SET status=0 WHERE name='devel_themer';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Updating a module in Git (the hard way, resolving a conflict)

(Some old notes from Stefan that I had to look up, so putting them online).

yesterday night i learnt some git. now i can tell you the meaning of fast-forward.
when you create a new branch off another one and after some time you want to merge the changes and the other branch hasn't advanced it's a fast forward merge. otherwise a merge commit will be crated.
if you want to merge changes to the original branch you forked off you should firts pull any changes from that one before merging or tou risk losing commits.

Git push failed.

Agaric looking at Trac for Project Management and Git integration

I have never liked Trac. I just don't like the user interface, the inability to use HTML if one wishes, some problems I encountered with cross-posting comments causing the slower writer (me) to lose their comment, and unquantifiable prejudice.

But everyone else at Agaric is for it, so for now we may try Trac+Git (a separate trac and a separate git repository for each client) for new projects rather than our Project module plus Organic Groups approach (which we will continue for most existing projects).

Cryptic Git Error Means There's No Git There

dan@mini9:~$ sudo git clone http://git.agaricdesign.com/git/drupal-6-agaric-core.git leftysbrew
Initialized empty Git repository in /home/dan/leftysbrew/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
dan@mini9:~$ sudo git-update-server-info
fatal: Not a git repository

Syndicate content