User login

Complete

To be used with care. Pages are complete only when they meet the posting guidelines.

Grep multiple files but exclude .svn (subversion) directories

The --exclude flag described below does not work.

This does:

grep -nHR 'needle' . | grep -v svn
from http://episteme.arstechnica.com/eve/forums/a/tpc/f/6330927813/m/902005657831

grep exclude .svn

Setting $GREP_OPTIONS in ~/.bashrc like this did the trick
export GREP_OPTIONS="--exclude="\*/.svn/\*"

The --exclude flag described below does not work.

This does:

grep -nHR 'needle' . | grep -v svn
from http://episteme.arstechnica.com/eve/forums/a/tpc/f/6330927813/m/902005657831

grep exclude .svn

<

blockquote>
Setting $GREP_OPTIONS in ~/.bashrc like this did the trick
export GREP_OPTIONS="--exclude="*/.svn/*"

Debugging Internet Explorer problems the Agaric way

Big ol' Get Firefox buttons!

Oh, OK, there's also another Agaric way for working around IE bugs, quirks, and problems.

Agaric Standard Operating Procedure (as of today)

If it is a border, box, or graphic overlapping something else or otherwise displaying incorrectly, get a measurement of a the thing showing wrong -- screenshot and the GIMP or another graphics editing program if necessary -- and get its dimensions.

Adding a URL alias in Drupal 4.7

When logged in (as an administrator of course) navigate to Administer » Url aliases (which is simply in the left-side personal menu as url aliases for you) then click the "add alias" tab.

http://example.org/admin/path

The existing system path is usually something like node/134 but in the case of views, it is whatever we've named them (which doesn't even need to have the word view, but we follow it as a convention). So, for Existing system path:

view/affiliates

When logged in (as an administrator of course) navigate to Administer » Url aliases (which is simply in the left-side personal menu as url aliases for you) then click the "add alias" tab.

http://example.org/admin/path

The existing system path is usually something like node/134 but in the case of views, it is whatever we've named them (which doesn't even need to have the word view, but we follow it as a convention). So, for Existing system path:

view/affiliates

and below that for the alias:

affiliates

And done! The desired link will now work.

Subversion reversion and big commits

svn revert revision
Reverting a revision is in fact titled nothing of the kind, but is a type of merge.

From http://mybravenewworld.wordpress.com/2007/11/13/subversion-how-to-revert-a-bad-commit/
subversion: How to revert a bad commit

svn merge -r [current_version]:[previous_version] [repository_url]

svn revert revision
Reverting a revision is in fact titled nothing of the kind, but is a type of merge.

From http://mybravenewworld.wordpress.com/2007/11/13/subversion-how-to-revert-a-bad-commit/
subversion: How to revert a bad commit

svn merge -r [current_version]:[previous_version] [repository_url]

Styles (CSS) in HTML document head, rather than included file

How to put cascading style sheet information in the head of an HTML document.

Not for web sites, which should have external style sheets.

Although on the other hand with such a push to have everything not make http requests, there are circumstances where you may want your CSS information embedded in the page.

From Yahoo's 13 rules for speeding up your web site:

How to put cascading style sheet information in the head of an HTML document.

Not for web sites, which should have external style sheets.

Although on the other hand with such a push to have everything not make http requests, there are circumstances where you may want your CSS information embedded in the page.

From Yahoo's 13 rules for speeding up your web site:

<

blockquote>

Styling XML: Making Colloquy transcripts browser-viewable

Agaric wants:
colloquy IRC export as html

Well, it outputs XML, so why don't we theme that?

http://www.w3.org/TR/html4/present/styles.html#h-14.2.3

http://www.w3.org/Style/styling-XML

css after text
pseudo text

Agaric wants:
colloquy IRC export as html

Well, it outputs XML, so why don't we theme that?

http://www.w3.org/TR/html4/present/styles.html#h-14.2.3

http://www.w3.org/Style/styling-XML

css after text
pseudo text

http://www.w3schools.com/css/css_pseudo_elements.asp

Too cool!

sender {
color: #900;
}
sender[self="yes"] {
color: #009;
}
sender:after {
content: ":";
}

xml display any selector as a tool-tip
xml display element as a tool-tip
xml show arbitrary element as a tooltip

MySQL database and user creation from the command line

On Agaric's test server, i need to log into MySQL as root to do these grant commands.

/usr/local/mysql/bin/mysql -uroot -p

On Debian, simply

mysql -uroot -p

worked. You have to put in your root password, of course. (And the lack of a space between -u and root is not a typo.)

In here, you can:

SHOW DATABASES;

CREATE DATABASE example_database;

GRANT ALL ON example_database.*
TO example_user@localhost IDENTIFIED BY 'p4ssw0rd';

Go back to the directory I was in on command line shell

unix go back to the directory i was in
go backwards one directory

cd -

at least in the Korn shell. Worked on my Mac's bash and on Agaric's Debian server.

More common shell commands for moving around in the file structure...

Go to home directory:

cd ~

Go up one directory

cd ..

unix go back to the directory i was in
go backwards one directory

cd -

at least in the Korn shell. Worked on my Mac's bash and on Agaric's Debian server.

More common shell commands for moving around in the file structure...

Go to home directory:

cd ~

Go up one directory

cd ..

Permanent redirect on home web address only, leaving archive

Hey all, contrary to Agaric's usual pain-before-gain approach, here is the answer we eventually found up top:

RedirectMatch ^/$ http://example.com/e/www/

RedirectMatch, not RedirectRule, to go to a new site, is the little-known secret.

So that's why none of this worked:

Hey all, contrary to Agaric's usual pain-before-gain approach, here is the answer we eventually found up top:

RedirectMatch ^/$ http://example.com/e/www/

RedirectMatch, not RedirectRule, to go to a new site, is the little-known secret.

So that's why none of this worked:

<

blockquote>

RewriteRule ^/ http://coanews.freespeech.org/ [R=permanent,L]

RewriteCond %

Putting text and HTML in forms in Drupal 5 FAPI

Form API

For '#type' => 'markup' form fields (which is the default type)

Use #value, not #description, to put in your HTML markup if you want anything to show up.

Agaric still wishes type markup could use all the same information but display it static, and not as a form, or even as a non-editable form.

Form API

For '#type' => 'markup' form fields (which is the default type)

Use #value, not #description, to put in your HTML markup if you want anything to show up.

Agaric still wishes type markup could use all the same information but display it static, and not as a form, or even as a non-editable form.

Syndicate content