stan is currently certified at Journeyer level.

Name: Tristan Hill
Member since: 2009-03-16 21:44:05
Last Login: 2012-02-27 14:59:56

FOAF RDF Share This

No personal information is available.

Recent blog entries by stan

Syndication: RSS 2.0
python pip non root install

Ahhh finally found the right options,

pip install ipdb --install-option="--user"

Quick export of code to testing server

For bzr and git:

bzr export --format=tar - | ssh -C server tar x -C /path/to/overwrite/files/in

git archive --format=tar HEAD | ssh -C server tar x -C /path/to/overwrite/files/in


Not perfect, as deleted files aren't removed, but good enough most of the time
File server encryption setup

I've been in the process of setting up encryption on my server for a while. At work we use lvm encryption - which works well. The lvm server is running debian and has the dropbear package installed. If it is rebooted, we just ssh in and supply the password.

My server also provides dhcp service, so unless you manually configure the client's networking the ssh part doesn't work. So instead I've been setting up ecryptfs, since I use it all my client machines. The configuration on my server is slightly more manual - I'm using mount -t ecryptfs directly.

I'm using a custom cgi script to allow the partition to be mounted. Seems to be working ok.

After thinking about it while writing this I'm preferring making dhcp work somehow (move it somewhere etc) and using lvm in the long run - slight it makes it easier to make sure everything is encrypted. Also the client part would be slightly harder as you need to use a ssh client rather than a web client.

Got annoying


`menu_proxy_module_load': gedit: undefined symbol: menu_proxy_module_load
errors? do
dpkg --purge appmenu-gtk
to get rid of
/etc/X11/Xsession.d/80appmenu
that causes this
27 Jun 2009 (updated 28 Jun 2009 at 08:00 UTC) »

Here's my python implementation of Rob Pike's minimal regex (only supports ^.*$ special characters) algorithm:

def match(regexp, text):
    if regexp.startswith("^"):
        return matchhere(regexp[1:], text)
    for i in range(len(text) or 1):
        if matchhere(regexp, text[i:]):
             return True
    return False

def matchhere(regexp, text):
    if len(regexp) == 0:
        return True
    if regexp[1:].startswith("*"):
        return matchstar(regexp[0], regexp[2:], text)
    if regexp == "$":
        return len(text) == 0
    if len(text) > 0 and (regexp[0] == "." or regexp[0] == text[0]):
        return matchhere(regexp[1:], text[1:])
    return False

def matchstar(c, regexp, text):
    for i in range(len(text) or 1):
        if matchhere(regexp, text[i:]):
             return True
        if len(text) < 0 or c not in (text[i], "."):
             return False

import unittest

class Test(unittest.TestCase):

    def test(self):
        self.assert_ (match("a", "a"))
        self.assert_ (not match("a", "b"))
        self.assert_ (match("^a$", "a"))
        self.assert_ (match("^a*b$", "aaaab"))
        self.assert_ (not match("^a*b$", "aaacb"))
        self.assert_ (match("a*a", "aa"))

Here's hoping there's no other major bugs.

3 older entries...

 

Others have certified stan as follows:

  • fzort certified stan as Apprentice
  • redi certified stan as Apprentice
  • dangermaus certified stan as Journeyer

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page