Recently I have been using one my favorite text editors on my mac to process some text lines. Below is a list of some commands I found useful:
Lowercase every character: tr [:upper:] [:lower:]
Sort the lines: sort
Show only unique lines: uniq
Recently I have been using one my favorite text editors on my mac to process some text lines. Below is a list of some commands I found useful:
Lowercase every character: tr [:upper:] [:lower:]
Sort the lines: sort
Show only unique lines: uniq
I really like the Trac project management software. Recently I have been using it very much and customizing it to fit my needs at work. In regards with the notification system, I found that the default format was not acceptable and a custom one was desired. I added the following code to the file "/usr/lib/python2.4/site-packages/trac/ticket/templates/ticket_notify_email.txt" to have a nice date in the template:
{% python
from genshi.builder import tag
from trac.util.datefmt import format_datetime
import time
def custom_time(value):
return format_datetime(t=value, format='%H:%M:%S', tzinfo=PST)
%}
${custom_time(ticket.time)}
My entire file looks like the following:
{% python
from genshi.builder import tag
from trac.util.datefmt import format_datetime
import time
def custom_time(value):
return format_datetime(t=value, format='%Y-%m-%d %H:%M:%S', tzinfo=PST)
%}
{% choose ticket.new %}\
{% when True %}\
On ${custom_time(ticket.time)} PST, a ticket with the summary of '$ticket.summary' was created by '$ticket.reporter' and assigned to $ticket.owner .
{% end %}\
{% otherwise %}\
{% if changes_body %}\
${_('Changes (by %(author)s):', author=change.author)}
$changes_body
{% end %}\
{% if changes_descr %}\
{% if not changes_body and not change.comment and change.author %}\
${_('Description changed by %(author)s:', author=change.author)}
{% end %}\
$changes_descr
--
{% end %}\
{% if change.comment %}\
${changes_body and _('Comment:') or _('Comment (by %(author)s):', author=change.author)}
$change.comment
{% end %}\
{% end %}\
{% end %}\
--
${_('Ticket URL: <%(link)s>', link=ticket.link)}
$project.name <${project.url or abs_href()}>
$project.descr
You have two multiselect list boxes and you want to insert their combined values into a table. Here is an example:
When you select "birds, trees" and "type a" the following select statements will be executed:
Here is the following VBA Script to do the above:
Private Sub Command4_Click()
Dim varRoles As Variant
Dim varRole As String
Dim varUserNames As Variant
Dim varUserName As String
Dim strSQL As String
For Each varRoles In Me.Role.ItemsSelected
'MsgBox "we got one role!"
varRole = Me.Role.ItemData(varRoles)
For Each varUserNames In Me.UserName.ItemsSelected
varUserName = Me.UserName.ItemData(varUserNames)
'MsgBox "we got username: " & varUserName & ", mapped to role: " & varRole
'execute statement
CurrentDb.Execute "INSERT INTO jointable (names, roles) VALUES ('" & varUserName & "', '" & varRole & "')"
Next varUserNames
Next varRoles
End Sub
To set your proxy server in Emacs, type the following in a empty buffer:
(setenv "http_proxy" "http://your.proxy.server.com:8080")
Then execute the lisp code in the current buffer with:
M-x eval-current-buffer