Do you collect code scripts?
public
group: Wastelands
Chris Charlton - Mon, 2008-10-06 16:03
Yes, and I would cry if I lost them.
30% (3 votes)
A little; I try to.
20% (2 votes)
No, I don't collect code scripts. (I rely on google)
50% (5 votes)
I bookmark code/scripts I find on the web
0% (0 votes)
What the heck is a code script/snippet?
0% (0 votes)
Total votes: 10



My 2cent on that: Really
My 2cent on that: Really great Idea. Drupal beginners that like to test around on a local Drupal installation would love to have a site with scripts to play around. With intense experimentation you get a very intense knowledge on how Drupal works
Cheers Wolfflow
code snippet recipe
On our extranet we use the fine GeshiFilter module (and the geshinode content type it creates) for code snippets. It's been invaluable and I can't recommend it enough. The superior syntax highlighting and line numbering are awesome. If you've ever used DrupalBin then you've seen the basic functionality it offers.
It hasn't actually been as useful for internal use as I originally thought it would be, but it's the easiest way by far to share a code snippet to the outside world. For example, you know what I'm talking about if you've ever asked me for code snippets on IRC.
Together with GeshiFilter, we use Link for citing external resources, CCK Teaser Field to turn our code snippet form's custom "description" field into the teaser (so that all the PHP, JavaScript, etc. end up in the teaser), Content Templates for theming the RSS feed accordingly and finally Diff for viewing revisions. The geshinodes have regular node revisions, comments and are editable by anyone on the extranet (in this way it's not unlike a wiki page).