Code Vault

From Sfvlug

Revision as of 21:04, 12 December 2006 by Admin (Talk | contribs)

What is the best way to contribute code? Should it just be placed here or should a seperate page be created?

Contents

Note:

How to contribute code and the organization of this section will be a topic of discussion at the Saturday December 16, 2006 meeting. See Meetings for more information on the meeting.

Good question, I had intended to leave a lot of that type of decision up to whoever posted something but since this is going to be a community page it might be better to keep it less cluttered so I will suggest making a brief statement here about the code and a link to the page where the actual code lives. The discussion tab Talk:Code Vault can be used for comments rather than making further clutter here. If you haven't gotten the copyright holder's permission to use the code the link should be to the original source.

Here are some examples to give everyone a better idea, we can clean this area up later once we get more contributions:

(Let's say I'm not about the license and don't know if it is OK to reproduce.)

Access Database to HTML

I have written a bash script that converts Access databases to HTML. Source Code

I know of at least two people in the LUG who were interested in this functionality. Code is GPL.

Process Substitution (or, how to do more with less effort)

Process Substitution is a good way to do things in a single line of script or at the command line, that would otherwise take extra work like writing to temp files.

Python File Slicing

pyFileSlice is a simple utility that will chop out a section of a file that has common starting and ending tags. Pulling out the page referrers section in an Awstats data file for further analysis prompted this little bit of research. After trying 3 methods (one involving regex pattern checking over each element in a list, one involving startswith(), and one that uses startswith() and doesn't read the file all at once) the one presented here works the fastest with the least amount of memory used. Source Code.

note: 20061211: alternate method posted for looping through the file.


Return to Main Page

Personal tools