« February 2008 | Main | May 2008 »

April 20, 2008

ONLamp.com -- Improve Your Build Process with Ant

Posted by pj at 08:05 PM | Comments (0)

April 15, 2008

Python script for getting changed files

The following Python script gets you a list of files changed between two subversion revisions:

import sys
import os
import re

lines = []

for counter in range(int(sys.argv[1]) - 1, int(sys.argv[2]) + 1):
    lines.append(os.popen('/usr/local/bin/svn log -vv -r  ' + str(counter)));

tally = {}

for results in lines:
    for line in results:
        reg = re.compile("svn-repository")
        if reg.search(line):
            tally[line] = 1

final = tally.keys()

final.sort()

print " " + " ".join(final)

Posted by pj at 05:06 PM | Comments (0)

Academi version of add_update_functions

function date_splitter($key){

    global $r;

    $b = explode('/', $r[$key]);

    $ts = mktime(0,0,0, $b[1], $b[0], $b[2]);
    
    $r[$key] = $ts;
    
    }

function get_options($reply, $vcol, $lcol){
    
    $opts = array();
    
    if(count($reply['rows']) > 0){ foreach($reply['rows'] as $row){
        
        $opts[] = '

Posted by pj at 04:24 PM | Comments (0)

Coniston version of email_functions with BCC

function get_mail_headers($from){

    $boundary = "boundary_".mktime();
    
    $headers['boundary'] =  '--'.$boundary;
    
    $headers['endary'] =  '--'.$boundary.'--';
    
    $head = array();
    
    $head[] = 'MIME-Version: 1.0';
    
    $head[] = "From : ".$from;
    
    $head[] = "Bcc : ".$from;
    
    $head[] = 'Content-Type: multipart/mixed; '."\r\n\t".'boundary="'.$boundary.'"';
    
    $head[] = 'Content-Transfer-Encoding: 8bit';
    
    $head[] = "\r\n";
    
    $headers['head'] = $head;
    
    $headers['printable'] = implode("\r\n", $headers['head']);
    
    return $headers;
    
    }

Posted by pj at 04:18 PM | Comments (0)