Notes on Tomboy Notes


Installing Tomboy

It's usually already there for Debian distros. For RPM-based Linuces, do

$ sudo yum install tomboy

Diacritics note

Frequently broken, the ability of some Linuces to give you the option to type accented characters optionally (see here for Debian distros), that is, without converting your keyboard to some non-local variant, creates the need for this note. Copy and paste this text into a Tomboy note.

Paste this and change the font to Fixed Width/Monospace, normal height. You may need to insert or remove spaces to pretty it up.

I put the ones at the left separate because my need is always for French.

Diacritics, etc.

à â        á ä ã æ Æ
é è ê      ë
î ï        í ì
ô œ        ó ò ö õ ø
ù û ü      ú
ç Ç        ß ñ ð þ

« »

¡ ¿

HTTP status code note

Paste this and change the font to Fixed Width/Monospace, normal height. You may need to insert or remove spaces to pretty it up. The yellow ones are those I use more frequently than any others.

HTTP Status Codes

200 OK                 300 Multiple choices
201 Created            301 Moved permanently
202 Accepted           302 Found
203 Non-authoritative  303 See other
204 No content         305 Use proxy
                       307 Temporary redirect
                       308 Permanent redirect
400 Bad request        500 Internal server error
401 Unauthorized       501 Not implemented
402 Payment required   502 Bad gateway
403 Forbidden          503 Service unavailable
404 Not found          504 Gateway time-out
409 Conflict

UNIX Filesystem Permissions
UNIX Filesystem Permissions

----------    0000    no permissions
---x--x--x    0111    execute
--w--w--w-    0222    write
--wx-wx-wx    0333    write, execute
-r--r--r--    0444    read
-r-xr-xr-x    0555    read, execute
-rw-rw-rw-    0666    read, write
-rwxrwxrwx    0777    read, write, execute

SAX Parser Sample
SAX Parser Sample

def getResult():
  result         = httpclient.get( uri )
  payload        = result.read()
  resultIdParser = CqPostResponsePayload()
  try:
    xml.sax.parseString( payload, resultIdParser )
  except Exception as e:
    print e.message
  return resultIdParser.getResultId()

class CqPostResponsePayload( xml.sax.ContentHandler ):
  '''
  Parse response payload, looks something like:
  fWkcTS1a
  '''
  def __init__( self ):
    self.result = StringIO()
    self.resultIdCharacters = ''
  def getResultId( self ):
    return self.result.getvalue().lstrip().rstrip()
  def startElement( self, tag, attributes=None ):
    if tag == 'result_id':
      self.resultIdCharacters = ''
    else:
      pass
  def endElement( self, tag ):
    if tag == 'result_id':
       # tie off the result_id...
      print >> self.result, self.resultIdCharacters
    else:
      pass
  def characters(self, content ):
    self.resultIdCharacters += content