Planet Docunext

June 17, 2009

Docunext Wiki

Web applications

Redirecting to Web Application Frameworks

New page

#REDIRECT [[Web Application Frameworks]]

by Admin at June 17, 2009 06:10 AM

Mod fcgid

Summary -

←Older revision Revision as of 06:04, 17 June 2009
(One intermediate revision not shown.)
Line 6: Line 6:
* [[Ruby]] * [[Ruby]]
* [[C]] (compiled) * [[C]] (compiled)
 +* [[Perl]]
 +* [[Python]]
 +* [[TCL]]
== Merged with [[Apache]] == == Merged with [[Apache]] ==
In early 2009, mod_fcgid was merged with the [[Apache]] httpd codebase. In early 2009, mod_fcgid was merged with the [[Apache]] httpd codebase.
 +
 +
 +== mod_fcgid Configuration ==
 +<pre>
 +<IfModule mod_fcgid.c>
 + AddHandler fcgid-script .fcgi .php
 + IPCConnectTimeout 20
 + ProcessLifeTime 120
 + IdleTimeout 60
 + IdleScanInterval 30
 + DefaultMinClassProcessCount 0
 + MaxRequestsPerProcess 499
 +</IfModule>
 +</pre>
 +In my experience, the processlifetime and idletimeout settings only work when DefaultMinClassProcessCount is set to 0.
== Related Pages == == Related Pages ==

by Admin at June 17, 2009 06:04 AM

Open ID

←Older revision Revision as of 02:09, 17 June 2009
Line 1: Line 1:
 +== Open ID Summary ==
Open ID is a federated or distributed identification system. Open ID is a federated or distributed identification system.
 +
 +== My Experience with Open ID ==
 +I setup and Open ID server way back when it was first announced, but I never used it as there weren't too many consumers. These days I use Verisign as the provider, but I use my own domain and url as my id, and delegate the authentication to Verisign.

by Admin at June 17, 2009 02:09 AM

OpenID

Redirecting to Open ID

New page

#REDIRECT [[Open ID]]

by Admin at June 17, 2009 02:07 AM

Debian

External Debian Links -

←Older revision Revision as of 01:50, 17 June 2009
(One intermediate revision not shown.)
Line 26: Line 26:
* [[apt-get source]] * [[apt-get source]]
-===dpkg===+===[[dpkg]]===
-Some notes about dpkg: +Some notes about [[dpkg]]:
* Look, don't touch, in /var/lib/dpkg * Look, don't touch, in /var/lib/dpkg
* /var/lib/dpkg/info contains information about file digests * /var/lib/dpkg/info contains information about file digests
Line 49: Line 49:
== External Debian Links == == External Debian Links ==
 +* http://www.mindeb.com/
* http://www.ocf.berkeley.edu/~tmtong/howto/debiantips.php * http://www.ocf.berkeley.edu/~tmtong/howto/debiantips.php
* [http://www.docunext.com/blog/category/operating-systems/debian/ Debian Category at Docunext] * [http://www.docunext.com/blog/category/operating-systems/debian/ Debian Category at Docunext]

by Admin at June 17, 2009 01:50 AM

Lua SQL

New page: == Lua SQL Summary == This is fairly straightforward, very logical. I like it! == Lua SQL Example == From YoDNSConf: <pre> --[[ <!-- Program: YoDNSConf Component: domain_list.lua Copy...

New page

== Lua SQL Summary ==
This is fairly straightforward, very logical. I like it!

== Lua SQL Example ==
From [[YoDNSConf]]:
<pre>
--[[ <!--
Program: YoDNSConf
Component: domain_list.lua
Copyright: Savonix Corporation
Author: Albert L. Lash, IV
License: Gnu Affero Public License version 3
http://www.gnu.org/licenses

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses
or write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA 02110-1301 USA
--> --]]
require "luasql.mysql"
require "config"

env = assert (luasql.mysql())
con = assert (env:connect(dbconfig["database"],dbconfig["username"],dbconfig["password"],dbconfig["hostname"]))

function rows (connection, sql_statement)
local cursor = assert (connection:execute (sql_statement))
return function ()
return cursor:fetch()
end
end

for origin,ns,mbox,refresh,retry,minimum,ttl,expire,serial,id in rows (con, "select origin,ns,mbox,refresh,retry,minimum,ttl,expire,serial,id from soa WHERE serial>="..os.date("%Y%m%d00")) do
myzone = "$ORIGIN "..origin.."\n".."$TTL 12h\n"
myzone = myzone..origin.." IN SOA "..ns.." "..mbox.." ("
myzone = myzone.."\n\t\t"..serial
myzone = myzone.."\n\t\t"..refresh
myzone = myzone.."\n\t\t"..retry
myzone = myzone.."\n\t\t"..expire
myzone = myzone.."\n\t\t"..minimum.."\n\t\t)"
for name,data,ttl,type,aux,weight,port in rows (con, "select name,data,ttl,type,aux,weight,port from rr WHERE zone="..id) do
myzone = myzone..name.." IN "..ttl.." "..type
if (type == "MX") then
myzone = myzone .." "..aux
end
if (type == "SRV") then
myzone = myzone .." "..aux.." "..weight.." "..port
end
if (type == "TXT") then
myzone = myzone .." \""..data.."\""
else
myzone = myzone.." "..data
end
myzone = myzone.."\n"
end
F = io.open("zones/"..origin.."zone.","w")
F:write(string.format ("%s", myzone))
F:close()
--print (string.format ("%s", myzone))
end
</pre>

[[Category:Databases]]
[[Category:SQL]]
[[Category:Lua]]

by Admin at June 17, 2009 01:47 AM

Lua

←Older revision Revision as of 01:46, 17 June 2009
Line 1: Line 1:
 +== Lua Summary ==
Lua is a small, fast, embeddable scripting language. Lua is a small, fast, embeddable scripting language.

by Admin at June 17, 2009 01:46 AM

Mod wombat

New page: Apache Lua module. Category:Lua Category:Apache

New page

[[Apache]] [[Lua]] module.



[[Category:Lua]]
[[Category:Apache]]

by Admin at June 17, 2009 01:45 AM

June 16, 2009

Docunext Wiki

Web Application Frameworks

Popular Frameworks -

←Older revision Revision as of 05:11, 16 June 2009
Line 4: Line 4:
== Popular Frameworks == == Popular Frameworks ==
-* [[Nexista]]+* [[Nexista]] ([[PHP]], [[XSLT]], [[XML]])
-* [[Ruby on Rails]]+* [[Ruby on Rails]] ([[Ruby]])
-* [[Catalyst]]+* [[Catalyst]] ([[Perl]])
-* [[Symfony]]+* [[Symfony]] ([[PHP]])
* [[Mojolicious]] * [[Mojolicious]]
[[Category:Frameworks]] [[Category:Frameworks]]

by Admin at June 16, 2009 05:11 AM

Web application framework

Redirecting to Web Application Frameworks

New page

#REDIRECT [[Web Application Frameworks]]

by Admin at June 16, 2009 05:09 AM

Postfix Access Controls

New page

== My Fileset ==
<pre>
l:/etc/postfix# ls access_files/
authenticated_users postfix-dnswl-header-cidr postfix-dnswl-permit.asc recipient_access_classes update_authenticated_clients
authenticated_users.cdb postfix-dnswl-header-ones postfix-dnswl-permit-cidr recipient_access_classes.cdb update_dnswl
postfix-dnswl-header postfix-dnswl-header-ones.cdb postfix-dnswl-permit-ones sender_access
postfix-dnswl-header.asc postfix-dnswl-permit postfix-dnswl-permit-ones.cdb sender_access.cdb
</pre>

== Update Script ==
<pre>
#!/bin/sh
# Copyright: Savonix Corporation
# Author: Albert Lash
# Year: 2009
# License: GPLv3 + MIT

rsync --times rsync1.dnswl.org::dnswl/postfix-* /etc/postfix/access_files/
cat postfix-dnswl-header | sed "s/X-REPLACEME:/X-SHHHHH: YES/" > finalheader
mv finalheader postfix-dnswl-header
cat postfix-dnswl-header | grep ^[1-9] | grep -v /32 > postfix-dnswl-header-cidr
cat postfix-dnswl-header | grep ^[1-9] | grep /32 | sed "s/\/32//" > postfix-dnswl-header-ones
postmap cdb:postfix-dnswl-header-ones


cat postfix-dnswl-permit | grep ^[1-9] | grep -v /32 > postfix-dnswl-permit-cidr
cat postfix-dnswl-permit | grep ^[1-9] | grep /32 | sed "s/\/32//" > postfix-dnswl-permit-ones
postmap cdb:postfix-dnswl-permit-ones

exit 0
</pre>

[[Category:Email]]

by Admin at June 16, 2009 03:00 AM

My Email Services Configurations

Email Components -

←Older revision Revision as of 02:58, 16 June 2009
Line 72: Line 72:
** [[Spamassassin]] ** [[Spamassassin]]
** RBLDNS ** RBLDNS
 +** [[Postfix Access Controls]]
** Procmail ** Procmail
* Email Clients * Email Clients

by Admin at June 16, 2009 02:58 AM

June 11, 2009

Docunext Wiki

Perl Modules

New page

== Perl Module Summary ==
Perl modules are very helpful when trying to keep larger programs organized. As a style convention, I've noticed that modules usually start with a capital letter, and use the .pm suffix / extension.




== External Links ==
This is an incredible quick and easy tutorial on [[Perl]] modules:
* http://perl.plover.com/Hello/




[[Category:Perl]]

by Admin at June 11, 2009 10:44 PM

Perl

Programming in Perl -

←Older revision Revision as of 22:36, 11 June 2009
Line 6: Line 6:
==Programming in Perl== ==Programming in Perl==
* [[Perl OOP]] * [[Perl OOP]]
 +* [[Catalyst]]
 +* [[Perl Modules]]
 +* [[timtowtdi]]
==Perl and Datasources== ==Perl and Datasources==

by Admin at June 11, 2009 10:36 PM

Flip the switch shell switch

New page: Oh what fun: <pre> #!/bin/sh cp $1 /tmp/tmp.bk grep '#ZZ\*' $1 > /dev/null if [ "$?" -ne "0" ] then echo "commenting it out" cat $1 | awk ' /#ZZ$/ { printf "%s", $0; next } {print} ' > /...

New page

Oh what fun:

<pre>
#!/bin/sh
cp $1 /tmp/tmp.bk
grep '#ZZ\*' $1 > /dev/null

if [ "$?" -ne "0" ]
then
echo "commenting it out"
cat $1 | awk '
/#ZZ$/ { printf "%s", $0; next }
{print}
' > /tmp/tmp.tmp
else
echo "freeing it up"
sed 's/#ZZ\*/#ZZ\n\*/g' $1 > /tmp/tmp.tmp
fi
mv /tmp/tmp.tmp $1
exit 0
</pre>

by Admin at June 11, 2009 05:06 AM

Command Line Interface

Example CLI Tasks -

←Older revision Revision as of 05:05, 11 June 2009
Line 3: Line 3:
The CLI is referred to in many ways: The CLI is referred to in many ways:
-* [[Shell]]+* Shell
* [[Console]] * [[Console]]
* [[Terminal]] * [[Terminal]]
- 
== Example CLI Tasks == == Example CLI Tasks ==
* [[Count the number of files within a directory]] * [[Count the number of files within a directory]]
* [[Create md5sum file manifest of a directory]] * [[Create md5sum file manifest of a directory]]
 +* [[Flip the switch shell switch]]
== Command Line Software == == Command Line Software ==

by Admin at June 11, 2009 05:05 AM

NGINX SSI Module

SSI Example -

New page

== NGINX SSI Module Summary ==
I'm very pleased that NGINX has this module. SSI stands for server side includes, and they are about the simplest template system in existence. Several other web servers support server side includes, at least [[Apache]] does I know that for sure.

== My Experience with SSIs ==
At first I disregarded SSIs because they were too simple and limited for complex tasks. They are often too limited, but a nice quality of simplicity is that there is less change of error (at least in theory).

== SSI Example ==
In NGINX I'm using this for footer links:
<pre class="sh_html">
<!--# block name="empty" --><!--# endblock -->
<!--# include virtual="/s/ssi/footer_links.html" stub="empty" -->
<!--# echo var="myhost" -->
</pre>
This loads the footer_links.html file, and if it is unavailable substitutes the empty block instead. The virtual attribute is for http requests, so instead of an html file, a dynamic file could be requested to generate the block of content on the fly.

The last directive is an example of using a variable which can be set in the config file. For that variable to be set, I put this in my [[NGINX]] config file:
<pre>
set $myhost $host;
</pre>

[[Category:NGINX]]

by Admin at June 11, 2009 04:18 AM

NGINX

Official Modules -

←Older revision Revision as of 03:14, 11 June 2009
Line 107: Line 107:
* [[NGINX Image Filter]] * [[NGINX Image Filter]]
* [[NGINX Gzip Precompression Module]] * [[NGINX Gzip Precompression Module]]
 +* [[NGINX SSI Module]]
=== Third Party Modules === === Third Party Modules ===

by Admin at June 11, 2009 03:14 AM

Movable Type

My Experience with and Review of Movable Type -

←Older revision Revision as of 02:55, 11 June 2009
Line 35: Line 35:
</IfModule> </IfModule>
</pre> </pre>
 +
 +After a few months of using Movable Type with [[FastCGI]], I gave up and reverted back to regular [[CGI]]. I just got too many errors. I believe newer versions of Movable Type have better support for it. I hope so!
 +
 +== My Experience with and Review of Movable Type ==
 +At first, MTOS felt a little clunky. It was slower and had a lot of seemingly unnecessary complexity. After giving it a few months of use, I absolutely love it. Six Apart has done a great job. I plan to use Movable Type for a long time into the future!
 +
 +Of course I have some recommendations:
 +* Add a link to the edit template page from the template refresh confirmation page. I find myself refreshing templates, then returning to templates, then editing templates way too often; let's skip that middle step.
 +* Use XSL instead of mtml, or at least offer the choice.
 +* Give more flexibility with mt-static.
 +* Uploaded asset templates.
 +* Fix the Wordpress import mechanism. See [http://www.informedblogging.com/blog/2009/06/regexp-pattern-for-importing-wordpress-xml-into-movabletype.html Regexp Pattern for Importing Wordpress XML into MovableType]
 +
 +Hope someone is listening!
== External == == External ==

by Admin at June 11, 2009 02:55 AM

MTOS

Redirecting to Movable Type

New page

#REDIRECT [[Movable Type]]

by Admin at June 11, 2009 02:45 AM

Courier-authdaemon

New page: The authentication system for Courier, can use the following mechanisms / back-ends: * MySQL * LDAP * UserDB Category:Courier

New page

The authentication system for [[Courier]], can use the following mechanisms / back-ends:
* [[MySQL]]
* [[LDAP]]
* [[UserDB]]


[[Category:Courier]]

by Admin at June 11, 2009 01:02 AM

Courier-filter-perl

New page: This seems interesting... Category:Courier

New page

This seems interesting...


[[Category:Courier]]

by Admin at June 11, 2009 12:05 AM

June 10, 2009

Docunext Wiki

Courier

Related Pages -

←Older revision Revision as of 23:36, 10 June 2009
Line 58: Line 58:
* [[Postfix]] * [[Postfix]]
* [[OfflineIMAP]] * [[OfflineIMAP]]
 +* [[courier-filter-perl]]
[[Category:Email]] [[Category:Email]]
[[Category:Courier]] [[Category:Courier]]

by Admin at June 10, 2009 11:36 PM

CDB

New page: A fast hash database format created by Daniel J. Bernstein. Category:Databases

New page

A fast hash database format created by Daniel J. Bernstein.


[[Category:Databases]]

by Admin at June 10, 2009 07:52 PM

Postfix-cdb

New page: This is a package for using CDB (constant database) with Postfix. Category:Postfix

New page

This is a package for using [[CDB]] (constant database) with [[Postfix]].


[[Category:Postfix]]

by Admin at June 10, 2009 07:50 PM

Postfix

Postfix Add-Ons -

←Older revision Revision as of 19:49, 10 June 2009
Line 181: Line 181:
==Postfix Add-Ons== ==Postfix Add-Ons==
Postfix can work with lots of other programs and packages, for example: Postfix can work with lots of other programs and packages, for example:
-* [[x-postfix-admin]]+* [[chimailmadmin]]
* [[postfix-mysql]] * [[postfix-mysql]]
* [[dbmail]] * [[dbmail]]
Line 198: Line 198:
* http://www.gentoo.org/doc/en/virt-mail-howto.xml * http://www.gentoo.org/doc/en/virt-mail-howto.xml
* http://advosys.ca/papers/email/58-postfix-instance.html * http://advosys.ca/papers/email/58-postfix-instance.html
 +* http://www.terena.org/~visser/awl.php
[[Category:Email]] [[Category:Email]]
[[Category:SMTP]] [[Category:SMTP]]

by Admin at June 10, 2009 07:49 PM

Maildrop

External Links -

←Older revision Revision as of 19:42, 10 June 2009
Line 1: Line 1:
 +== Courier Maildrop ==
Maildrop can be used as a virtual mailbox transport. There are couple programs with this name, I use the [[Debian]] package [[courier-maildrop]]. Maildrop can be used as a virtual mailbox transport. There are couple programs with this name, I use the [[Debian]] package [[courier-maildrop]].
This component helps with [[spamassassin]] filtering, as well as vacation autoresponders. This component helps with [[spamassassin]] filtering, as well as vacation autoresponders.
 +
 +== Maildroprc ==
 +<pre>
 +
 +
 +</pre>
== Related Pages == == Related Pages ==
Line 9: Line 16:
* http://gentoo-wiki.com/Maildrop_configuration * http://gentoo-wiki.com/Maildrop_configuration
* http://www.courier-mta.org/maildrop/maildroptips.html * http://www.courier-mta.org/maildrop/maildroptips.html
 +* http://www200.pair.com/mecham/spam/maildroprc.txt
[[Category:Email]] [[Category:Email]]

by Admin at June 10, 2009 07:42 PM

Docunext Technology

Rethinking My Ikiwiki Setup

Time to rethink my ikiwiki setup:

ikiwiki: [NeoCarz Wiki] failed to get lock

No problem though, I’m using Subversion to store the ikiwiki data. For unrelated reasons, I happen to be using NFS to store the subversion repositories.

by Albert at June 10, 2009 06:30 PM

Docunext Wiki

Anonftpsync

New page

== Anonftpsync Summary ==
This is a tool which can be used to mirror [[Debian]] package archives. I use it and think that its great!

I'm looking to minimize the amount of files that get transferred though, so I'm reviewing the EXCLUDE options. I really only need to synchronize x86 and amd64, so I exclude the other architectures with ARCH_EXCLUDE. I also don't need [[kfreebsd]] packages that often, so I'll exclude those.

== ARCH_EXCLUDE ==
<pre>
ARCH_EXCLUDE="alpha arm armel hppa hurd-i386 ia64 m68k mipsel mips powerpc s390 sh sparc"
</pre>

== EXCLUDE ==
<pre>
EXCLUDE="--exclude *.orig.tar.gz --exclude installer-* --exclude *.diff.gz --exclude *.dsc --exclude oldstable/ --exclude unstable/ --exclude source/ --exclude /contrib/ --exclude /non-free/ --exclude *kfreebsd* --exclude *-dbg_*"
</pre>

[[Category:Debian]]

by Admin at June 10, 2009 05:36 PM

Apt

←Older revision Revision as of 17:17, 10 June 2009
Line 13: Line 13:
* [[Dpkg]] * [[Dpkg]]
* [[Aptitude]] * [[Aptitude]]
- +* [[Anonftpsync]]
[[Category:Packaging]] [[Category:Packaging]]
[[Category:Debian]] [[Category:Debian]]

by Admin at June 10, 2009 05:17 PM

Mod spamhaus

New page

Looks like its working:

<pre>
194.8.74.220 - - [09/Jun/2009:22:37:20 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.informedlicensing.com/blog/2009/03/ipod-license-agreement-timeout.html" "Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)"
194.8.74.220 - - [09/Jun/2009:22:44:58 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.informedmaintenance.com/blog/2008/09/informed-maintenance.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ru) Opera 8.01"
194.8.74.220 - - [09/Jun/2009:22:47:56 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.reaktiv8.com/blog/2008/11/voltron-rejuvenate.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
194.8.75.155 - - [09/Jun/2009:22:48:32 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.nodows.com/blog/2008/01/freebsd-postgres-python-perl-lighttpd-nginx.html" "Mozilla/4.0 (compatible; MSIE 4.01; Digital AlphaServer 1000A 4/233; Windows NT; Powered By 64-Bit Alpha Processor)"
194.8.74.220 - - [10/Jun/2009:00:30:44 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.proxy-sys.com/blog/2008/06/varnish.html" "Opera/9.00 (Windows NT 4.0; U; en)"
194.8.74.220 - - [10/Jun/2009:00:46:59 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.sickofthenews.com/blog/2009/03/vindication.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
194.8.74.220 - - [10/Jun/2009:01:07:18 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.informedlicensing.com/blog/2009/03/ipod-license-agreement-timeout.html" "Mozilla/3.0 (x86 [en] Windows NT 5.1; Sun)"
194.8.74.220 - - [10/Jun/2009:01:14:59 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.informedmaintenance.com/blog/2008/09/informed-maintenance.html" "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; MSIECrawler)"
194.8.74.220 - - [10/Jun/2009:01:17:57 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.reaktiv8.com/blog/2008/11/voltron-rejuvenate.html" "Opera/7.54 (Windows NT 5.1; U) [pl]"
194.8.74.220 - - [10/Jun/2009:03:00:41 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.proxy-sys.com/blog/2008/06/varnish.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [en]"
194.8.74.220 - - [10/Jun/2009:03:16:56 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.sickofthenews.com/blog/2009/03/vindication.html" "Opera/9.00 (Windows NT 4.0; U; en)"
194.8.74.220 - - [10/Jun/2009:03:37:18 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.informedlicensing.com/blog/2009/03/ipod-license-agreement-timeout.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
194.8.74.220 - - [10/Jun/2009:03:44:55 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.informedmaintenance.com/blog/2008/09/informed-maintenance.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322; PeoplePal 6.2)"
194.8.74.220 - - [10/Jun/2009:03:47:54 -0400] "POST /blog/cgi-bin/movabletype/mt-comments.cgi HTTP/1.0" 401 119 "http://www.reaktiv8.com/blog/2008/11/voltron-rejuvenate.html" "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; MSIECrawler)"
</pre>


Indeed it is:
<pre>
[Wed Jun 10 00:30:44 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.proxy-sys.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.proxy-sys.com/blog/2008/06/varnish.html
[Wed Jun 10 00:47:00 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.sickofthenews.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.sickofthenews.com/blog/2009/03/vindication.html
[Wed Jun 10 01:07:18 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.informedlicensing.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.informedlicensing.com/blog/2009/03/ipod-license-agreement-timeout.html
[Wed Jun 10 01:14:59 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.informedmaintenance.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.informedmaintenance.com/blog/2008/09/informed-maintenance.html
[Wed Jun 10 01:17:57 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.reaktiv8.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.reaktiv8.com/blog/2008/11/voltron-rejuvenate.html
[Wed Jun 10 03:00:41 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.proxy-sys.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.proxy-sys.com/blog/2008/06/varnish.html
[Wed Jun 10 03:16:57 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.sickofthenews.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.sickofthenews.com/blog/2009/03/vindication.html
[Wed Jun 10 03:37:18 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.informedlicensing.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.informedlicensing.com/blog/2009/03/ipod-license-agreement-timeout.html
[Wed Jun 10 03:44:55 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.informedmaintenance.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.informedmaintenance.com/blog/2008/09/informed-maintenance.html
[Wed Jun 10 03:47:54 2009] [crit] [client 194.8.74.220] mod_spamhaus: address 220.74.8.194.sbl-xbl.spamhaus.org is blacklisted. Deny connection to www.reaktiv8.com/blog/cgi-bin/movabletype/mt-comments.cgi, referer: http://www.reaktiv8.com/blog/2008/11/voltron-rejuvenate.html
</pre>

[[Category:Apache2]]
[[Category:Spam]]

by Admin at June 10, 2009 09:03 AM

Mod extract forwarded

External Links -

←Older revision Revision as of 09:00, 10 June 2009
Line 26: Line 26:
</IfModule> </IfModule>
</pre> </pre>
 +
 +== Related Pages ==
 +* [[mod_spamhaus]]
== External Links == == External Links ==

by Admin at June 10, 2009 09:00 AM

ApacheDS

New page: LDAP server powered by Java. Category:LDAP

New page

[[LDAP]] server powered by [[Java]].


[[Category:LDAP]]

by Admin at June 10, 2009 06:58 AM

LDAP Replication

←Older revision Revision as of 06:48, 10 June 2009
Line 1: Line 1:
 +== OpenLDAP Replication on [[Debian]] ==
 +
For setting up ldap replication on debian, I had to do this: For setting up ldap replication on debian, I had to do this:
* add moduleload syncprov and: * add moduleload syncprov and:

by Admin at June 10, 2009 06:48 AM

Docunext Technology

cc: error trying to exec ‘cc1plus’: execvp: No such file or directory

I’m trying to install encode::detect on debian, but got this error:

cc: error trying to exec 'cc1plus': execvp: No such file or directory

This fixed it:

apt-get install g++

by Albert at June 10, 2009 04:35 AM

June 09, 2009

Docunext Technology

Ssh Error: PTY allocation request failed on channel 0

Whoops! After cleaning up some virtual machines, I went too aggressive on some normal machines and removed some necessary stuff. I think I’ll be able to fix this though, as I’m still able to issue commands via ssh.

I reinstalled and re-enabled udev but I was still having problems, so I did this:

ssh example.com "sudo bash -i"
echo "none /dev/pts devpts defaults 0 0" >> /etc/fstab
mount -a

Then I was able to login again.

by Albert at June 09, 2009 09:10 AM

June 05, 2009

Docunext Technology

My Iptables Script

I’ve updated the iptables script that I use, although it varies from machine to machine, here’s the basic outline:

*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-N logdrop
-A logdrop -j DROP
 
-N limitlogdrop
-A limitlogdrop -j DROP
 
-N logok
-A logok -j ACCEPT
 
-N HASHLIMIT
-A HASHLIMIT -m hashlimit --hashlimit 2/hour --hashlimit-burst 1 --hashlimit-mode srcip --hashlimit-name ssh4 --hashlimit-htable-expire=300000 -j logok
-A HASHLIMIT -j limitlogdrop
 
-A INPUT -i eth0 -f -j logdrop
-A INPUT -m state --state INVALID -j logdrop
-A INPUT -s 127.0.0.0/255.0.0.0 ! -i lo -j logdrop
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j logdrop
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j logdrop
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN FIN,SYN -j logdrop
-A INPUT -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -j logdrop
-A INPUT -p tcp -m tcp --tcp-flags FIN,RST FIN,RST -j logdrop
-A INPUT -p tcp -m tcp --tcp-flags FIN,ACK FIN -j logdrop
-A INPUT -p tcp -m tcp --tcp-flags PSH,ACK PSH -j logdrop
-A INPUT -p tcp -m tcp --tcp-flags ACK,URG URG -j logdrop
 
# Rejected ports
# This is used for nolisting, real SMTP servers would have this open.
-A INPUT -p tcp -d 192.0.2.0 --dport 25 -j REJECT --reject-with tcp-reset
 
# Private access ports - trusted sources
-A INPUT -s 192.0.2.1 -p tcp --tcp-flags SYN,RST,ACK SYN --dport 22 -j ACCEPT
 
# Public ports - DNS, Ping, and HTTP
-A INPUT -p tcp --tcp-flags SYN,RST,ACK SYN --dport 22 -j HASHLIMIT
-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN --dport 53 -j ACCEPT
-A INPUT -p udp --dport 53 -j ACCEPT
-A INPUT -p icmp -m limit --limit 100/sec --limit-burst 100 -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN --dport 80 -j ACCEPT
 
# Accept good connections
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
 
# Drop the rest
-A INPUT -j logdrop
 
# Output filters
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p icmp -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
COMMIT

Not all the servers I use support hashtables, so those rules aren’t on all of them. I’m using hastables on kernels that support it because it provides more convenient access, and also foils brute force hack attempts which are just a nuisance.

Since I run debian, I put this into /etc/rc.local:

/sbin/iptables-restore /etc/iptables.sh

Docunext Iptables Page
Docunext Iptables Hashtable Page

by Albert at June 05, 2009 06:15 PM

sitecopy: Error: Could not connect to server / svn: OPTIONS of ‘http://…’: could not connect to server (http://…)

Looks like the new version of sitecopy in Squeeze is having problems. I get this error:

sitecopy: Error: Could not connect to server...

I did a quick search and someone else is having the same problem. Doh!

I downgraded to the one from Etch, which requires libneon26, and that works.

Hmmm, I think whatever is wrong here might be due to libneon27, as I’m not able to use svn either!

This might be the problem: Debian Bug report logs - #531338 :: svn: OPTIONS of ‘http://…’: could not connect to server (http://…)

Yup, needed to update libneon27 and libneon27-gnutls from sid.

by Albert at June 05, 2009 03:52 AM

June 02, 2009

Docunext Technology

Perl S3 Proxy

I’m surprised this isn’t easier to find: Perl S3 Proxy.

Too bad its Apache2 mod_perl2 specific. That’s not really bad, but I would like to use it with NGINX too.

There is also Net::Amazon::S3 and Amazon::S3, maybe those could be run as FastCGI applications?

by Albert at June 02, 2009 09:52 PM

June 01, 2009

Docunext Technology

New NGINX Proxy Filter Features and Example Usage

There are some very nice new NGINX features now available - and the 0.7.x branch has been marked stable!

Here’s the scoop on the new features:

  • there is a new image filter which is powered by libgd
  • the proxy server now includes a cache

This is terrific news in my opinion. NGINX is really becoming an excellent filtering proxy with the help of the existing XSLT transformer. One thing I’m hoping to see soon is a Markdown filter. That would be sweet.

It took me a moment to figure out how to use the proxy_cache, so here’s and example. In the http configuration section:

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    server_names_hash_bucket_size 128;
    access_log  /var/log/nginx/access.log;
    large_client_header_buffers 4 16k;
    proxy_buffer_size 16k;
    proxy_buffers 8 16k;
    proxy_busy_buffers_size 32k;
    proxy_intercept_errors on;
    proxy_cache_path  /var/lib/nginx/cache  levels=1:2   keys_zone=one:1m;
    proxy_cache_valid  200 302  10m;
}

The proxy_cache_path has to be on the same partition as the proxy_temp_path, and on debian, that is /var/lib/nginx/proxy.

So that’s just the base configuration. To have something get cached, I used the proxy_cache setting in a location directive:

    location /proxyme {
        default_type image/jpeg;
        image_filter_jpeg_quality 70;
        image_filter   resize  100 100;
        proxy_pass http://www.example.com/;
        proxy_cache one;
    }

That’s also an example of how to use the image_filter module. I tried using variables for the resize parameters, but that didn’t work. The resize feature keeps the scale of the original image, which is great.

by Albert at June 01, 2009 12:35 AM

May 31, 2009

Docunext Technology

Finally: Somewhat Custom Upload Paths for MovableType

This was unfortunately much more difficult than I had hoped. What I wanted to do was supply an absolute path for the asset upload, and have the paths for thumbnails built automatically by MovableType.

I was able to hack this into being by specifying the static directives as the asset url and path, like this:

* set target static uri in mt-config.cgi
* override it in the templates:
* include/archetype_editor.tmpl
* include/header.tmpl
* dialog/header.tmpl

First I tried this, but it wasn’t what I wanted:
* Edit /usr/share/perl5/MT/Asset.pm line 83:

: $1 eq 'r'           ? MT->instance->static_path

Also line 62.

ACTUALLY NO - instead changed lines 1004 and 1009 in /usr/share/perl5/MT/CMS/Asset.pm
to %s instead of %r. This will move only the asset, not the thumbnail.

I also used this technique to specify the sub-directory of the static directives.

And MediaUrls helps for general media resources.

by Albert at May 31, 2009 07:48 PM

Analytics on MovableType OpenSource

I’m using this template to add the javascript required to call out to Google Analytics:

<mt:If name="analytics_code">
<mt:If name="analytics_cookie_path">
<mt:Else>
<MTSetVar name="analytics_cookie_path" value="/blog/">
</mt:If>
<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("<MTGetVar name="analytics_code">");
pageTracker._setCookiePath("<MTGetVar name="analytics_cookie_path">");
<mt:If name="analytics_cookie_domain">
pageTracker._setDomainName("<MTGetVar name="analytics_cookie_domain">");
</mt:If>
pageTracker._trackPageview();
} catch(err) {}</script>
</mt:If>

by Albert at May 31, 2009 03:00 AM

May 30, 2009

Docunext Technology

MTOS Publishing Queue on Debian, Uploads, and Asset Paths

I setup a cronjob for:

/usr/share/movabletype/tools/run-periodic-tasks

to be run as www-data.

I also symlinked /etc/movabletype-opensource/mt-config.cgi to that directory.

What’s more, I have hacked up a few things which should really be configurable. For example, the template for pop-up windows of image thumbnails is in /usr/share/perl5/MT/Asset/Image.pm (on Debian). I changed it to use thickbox:

 q|%s|,
                 MT::Util::encode_html( $asset->url ),
—
> q|%s|,
>                 MT::Util::encode_html( $popup->url ),
>                 MT::Util::encode_html( $popup->url ),
>                 $asset->image_width,
>                 $asset->image_height,

Then I was trying to get my Multiblog MT install to publish its static resources to a central repository, similarly with uploaded assets. This has proved practically impossible, unfortunately. There is a way I found to do it in a somewhat logical manner… the database stores the asset with a prefix of “%r” which is the blog path. Its possible to use “%s” as the static path, or “%a” for the archive path.

I want better control over the publishing paths for assets and such for caching as well as file distribution. It makes sense from time to time to serve large files like images differently than small html / javascript / css.

I do have to say that the assets functionality it pretty awesome. They’ve done some really impressive work on managing images - great work Six Apart!

by Albert at May 30, 2009 08:53 PM

May 29, 2009

Docunext Technology

Messing with MovableType

I love workarounds. This problem about javascript same domain rules conflicting with MT’s static web path configuration option had me stumped.

Then I remembered mod_rewrite!

RewriteEngine On
RewriteCond %{QUERY_STRING} template
RewriteRule . - [E=MT_CONFIG:/usr/lib/cgi-bin/movabletype/mt-config-admin.cgi]

by Albert at May 29, 2009 04:35 AM

May 28, 2009

Docunext Technology

Quick News Updates: Movable Type, Catalyst, Varnish, Subversion, Ikiwiki, DAV, NGINX….

I’ve been hard at work lately - just finished up some cool tasks though, including some work with a Perl MVC framework called Catalyst. I like it! I’ve also been using Nginx’s pre-compression gzip module to lower server load.

I’m also using Movable Type and really growing to like publishing with static files. During the process of embracing static files, I’ve come to learn more about caching, cookies, and HTTP headers. In short: cookies crash the caching party. :-( Well its not that serious, but in the never ending pursuit of performance, every little bit counts!

I finally got around to updating my Varnish proxies to version 2.0. Nice work guys! Very very nice. I’ve got the health checks and fail-overs operational. Sweet!

Lastly, I was able to round up the code I used to power the direct “putting” of a text document to a DAV server, which in turn is connected to a Subversion repository with auto-commit enabled. My goal is to connect this with an Ikiwiki backend which will get triggered by the post-commit-hook and the publish the new content. My plan is to document and package this recipe up nice at a shiny new domain: http://www.jaderz.com/blog/. (Its empty right now, you don’t have to visit.)

That’s all for now… thanks for listening.

by Albert at May 28, 2009 04:38 AM

May 27, 2009

Docunext Technology

Ming is Great

I just had a nice conversation which included the topic of Ming: a C++ library which can generate SWF movies. It has bindings for many scripting languages like PHP, but can also by access with compiled C code. I’ve been using it for years and recently I’ve taken a little break, but I really want to start using it again.

Here is the Docunext wiki page about Ming, and here’s an open source project I’ve been working on for quite some time which uses Ming:

Internet Floor Plans

And of course, what’s a blog post about Ming without a link to Gazb’s Ming tutorials?

by Albert at May 27, 2009 07:42 PM

May 25, 2009

Docunext Forums

Cannot copy to HASH in sassign

I've also changed CMS/Dashboard.pm like this:
$blog_id = 0;
on line 246.

by admin at May 25, 2009 02:25 AM

May 23, 2009

Docunext Forums

Cannot copy to HASH in sassign

I think I may have fixed it by changing that line to:
my $system_perms = $user->permissions(0);

by albert at May 23, 2009 03:43 AM

Cannot copy to HASH in sassign

Gosh I wish I knew what the problem here was. I'm getting this error from MovableType when I run mt.cgi as a FastCGI script. It works most of the time, but seems to trip up when I switch blogs. It references line 134 of App.pm which is:
my $system_perms = $user->permissions(0) unless $perms && $perms->blog_id;

by albert at May 23, 2009 03:33 AM

May 19, 2009

Docunext Forums

I don't like to use python for web programming

Python is a pretty serious programming language, but I'm not crazy about using it for web development. Most of the web development I do is simple enough. I still use Trac, which is powered by Python, but I'd like to switch to svn::web which is powered by perl, and ikiwiki which is also powered by perl, but published static files as the end result. I am under the impression that python is more suited towards mathematical and scientific programming.

by albert at May 19, 2009 07:59 PM

PHP is the first language I learned

Its been many years of experience now, but PHP was the first programming language I learned. Its a good language in my opinion, not perfect, but it does what I need it to for the most part.

by albert at May 19, 2009 07:55 PM

Docunext Technology

WebDAV + SVN + Ikiwiki or Varnish Updates?

I’ve got a few hours to work on something good… should it be WebDAV + SVN integration with Ikiwiki, or upgrading my Varnish installs?

Truthfully, even though I want to upgrade ASAP, I think the Varnish installs should wait a few more weeks. I’ve been tweaking some settings and want to see what effect they have before I go changing anything.

So WebDAV + SVN + Ikiwiki integration it is. I’m planning on hooking up Established Sites to this somehow too; maybe even tying in MovableType!

by Albert at May 19, 2009 05:50 AM

x86_64 JIT Optimizations for Webkit GTK+

I was super excited about this when experimental support was first implemented, and now that its been mainlined for a few days I’m a little surprised at myself that I haven’t gotten it going yet.

I’m doing it now, and I’m hoping it works as well as I think it will! I’m surprised though… there hasn’t been much activity on the Epiphany subversion server lately. Hopefully I’m using the right address. Midori is staying active, speaking of which I wonder if the Webkit GTK+ gnome keyring integration works with Midori as well?

I just recompiled Midori and saving passwords for http auth isn’t available, but I’m compiling it again after doing a clean, maybe that will help.

by Albert at May 19, 2009 04:47 AM

May 18, 2009

Docunext Forums

Ruby on Rails

I gotta dig myself into Ruby on Rails one of these days. One of my complaints was that it wasn't fast enough, but supposedly Ruby 1.9 is much faster than 1.8. I'll have to find some benchmarks.

by admin at May 18, 2009 06:14 PM

May 07, 2009

Docunext Forums

NGINX

One of my favorite web servers.

by admin at May 07, 2009 10:43 AM

May 03, 2009

Docunext Forums

Forums updated...

We're now using Phunkybb 0.3alpha.

by admin at May 03, 2009 10:55 AM

Docunext Technology

Still Trying with Epiphany

I’m really looking forward to when I get to use Epiphany webkit all the time. The older version I’m using (2.22.3) is super fast, but is missing some important features:

  • Gnome Keyring (actual configured via Webkit)
  • Selective blocking of popup windows

I just tried compiling the latest subversion revision; it compiles, but when I try to run it I get this error:

symbol lookup error: /usr/local/bin/epiphany: undefined symbol: gtk_entry_set_icon_drag_source

Doh!

UPDATE! I got it to work, the gtk libs in /usr/local/lib were old, so I copied them from /usr/lib. That move crashed my current X session so after a reboo, voila:

Epiphany Screenshot

Also got the Gnome Keyring inclusion to configure, and it appears to work, but only for HTTP Auth.

by Albert at May 03, 2009 04:41 AM

Docunext Forums

Aortica

I made some awesome progress on Aortica last night!

by admin at May 03, 2009 02:51 AM

April 30, 2009

Docunext Technology

GTK Print Dialog / Iceweasel Crash?

Anyone else getting this? It happened to me once before when I was trying some gtk libs from sid, so I back-graded to lenny and it worked again.

It happens with all print dialog boxes, but with Iceweasel its instantaneous. I had previously tried to diagnose this but strace revealed little and I didn’t know what else to try…

Hmm, looks like Iceweasel is randomly crashing too. I just recently upgraded it, so there must be something funky going on. Seems to be related to my openvz kernel??? (The random crashes, not the print dialog crashes.)

UPDATE: For some unknown reason - the crash is no longer happening. :-)

by Albert at April 30, 2009 10:08 PM

April 28, 2009

Docunext Forums

Ikiwiki

I've been using Ikiwiki a lot and I really like it. I wrote up a quick review here: Quick Review of Ikiwiki

by admin at April 28, 2009 09:50 AM

Docunext Technology

Upgrading Varnish 1 to 2

Varnish 2.x is now is Debian Squeeze, and it includes some cool failover functionality I want to give a whirl. The 2.x branch has actually been around for awhile, but since Varnish is the frontline gateway to most of the web sites and services I publish, I wanted to give it some time to get tested.

I’ve been testing it too, and everything seems fine to me. I checked if there was a backport of Varnish 2.x for lenny, but I coulnd’t find one. That would be great if it were possible!

Anyway, I’m dreading having to update the syntax of the vcl files. I don’t think that they are too different, but my vcl files are messy and disorganized. In preparation of the upgrade, I’ve at least started to clean them up a bit.

UPDATE: I just tried my version 1 vcl with version 2 and the switch was really easy, I just used this in vim:

:%s/set backend//g

by Albert at April 28, 2009 02:50 AM

April 26, 2009

Docunext Technology

Debian Perl Conflict: libxml-sax-perl local version

Preparing to replace libxml-sax-perl 0.96+dfsg-1 (using libxml-sax-perl_0.96+dfsg-1_all.deb) ...
Unpacking replacement libxml-sax-perl ...
Setting up libxml-sax-perl (0.96+dfsg-1) ...
update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10...
Fatal: cannot call XML::SAX->save_parsers_debian().
You probably have a locally installed XML::SAX module.
See /usr/share/doc/libxml-sax-perl/README.Debian.gz .
dpkg: error processing libxml-sax-perl (--install):
 subprocess post-installation script returned error exit status 1
Processing triggers for man-db ...
Errors were encountered while processing:
 libxml-sax-perl

I was able to work around this using:

cd /usr/local/share/perl/5.10.0/XML/
mkdir dnu
mv SAX* dnu/
apt-get install libxml-libxml-perl

by Albert at April 26, 2009 01:36 AM

April 22, 2009

Docunext Technology

Latest WebKit Compilation Error

./.libs/libwebkit-1.0.so: undefined reference to `WebCore::XMLTokenizerScope::XMLTokenizerScope(WebCore::DocLoader*, void (*)(void*, char const*, ...), void (*)(void*, _xmlError*), void*)'
./.libs/libwebkit-1.0.so: undefined reference to `WebCore::XMLTokenizerScope::currentDocLoader'
./.libs/libwebkit-1.0.so: undefined reference to `WebCore::XMLTokenizerScope::~XMLTokenizerScope()'
./.libs/libwebkit-1.0.so: undefined reference to `WebCore::XMLTokenizerScope::XMLTokenizerScope(WebCore::DocLoader*)'
collect2: ld returned 1 exit status
make[1]: *** [Programs/DumpRenderTree] Error 1
make[1]: Leaving directory `/home/albertlash/src/webkitsvn'
make: *** [all] Error 2

I’m not complaining, just noting. :-)

by Albert at April 22, 2009 08:27 PM

Docunext Forums

Back again

Here's an example update:
# emerge -uDpv world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-libs/timezone-data-2009f [2009d] USE="nls" 360 kB
[ebuild     U ] sys-apps/sandbox-1.9 [1.6] 320 kB
[ebuild     U ] sys-apps/less-429 [424] USE="unicode" 0 kB
[ebuild     U ] sys-apps/man-pages-3.20 [3.19] USE="nls" LINGUAS="-cs -da -de -es -fr -it -ja -nl -pl -ro -ru -zh_CN" 1,062 kB
[ebuild     U ] sys-fs/udev-141 [140] USE="(-selinux)" 438 kB
[ebuild     U ] sys-devel/autoconf-2.63-r1 [2.63] USE="-emacs" 0 kB
[ebuild  NS   ] sys-libs/db-4.7.25_p3 [4.3.29-r2, 4.5.20_p2-r1, 4.6.21_p4] USE="-doc -java -nocxx -tcl -test" 12,829 kB
[ebuild     U ] dev-libs/libpcre-7.9-r1 [7.8] USE="bzip2 cxx (unicode) zlib -doc" 842 kB
[ebuild     U ] www-servers/nginx-0.7.50 [0.7.43] USE="pcre perl ssl zlib -addition -debug -fastcgi -flv -imap -random-index -status -sub -webdav" 567 kB
[ebuild     U ] sys-apps/coreutils-7.2 [7.1] USE="acl nls -caps (-selinux) -static -vanilla -xattr" 0 kB
[ebuild     U ] sys-apps/grep-2.5.4-r1 [2.5.4] USE="nls pcre (-static%)" 0 kB
[ebuild     U ] app-admin/eselect-1.0.12 [1.0.11-r1] USE="-bash-completion -doc (-vim-syntax%)" 143 kB
[ebuild  N    ] app-admin/eselect-python-20080925  2 kB
[ebuild     U ] www-servers/varnish-2.0.4 [2.0.3] 769 kB
[ebuild     U ] dev-lang/ruby-1.8.7_p72-r11 [1.8.7_p72-r10] USE="berkdb gdbm ipv6 ssl -debug -doc -emacs -examples -rubytests -socks5 -threads -tk -xemacs" 0 kB
[ebuild  NS   ] dev-lang/python-2.6.2 [2.4.4-r13, 2.5.4-r2] USE="berkdb gdbm ipv6 ncurses readline ssl threads xml -build -doc -examples -sqlite -tk -ucs2 -wininst" 10,905 kB
[ebuild     U ] dev-python/pycrypto-2.0.1-r8 [2.0.1-r6] USE="-bindist -gmp -test" 151 kB
[ebuild     U ] sys-apps/openrc-0.4.3-r2 [0.4.3-r1] USE="ncurses pam unicode -debug" 0 kB
[ebuild     U ] sys-apps/busybox-1.13.4 [1.13.3] USE="pam -debug -make-symlinks -savedconfig (-selinux) -static" 2,000 kB
[ebuild     U ] sys-apps/shadow-4.1.3.1 [4.1.2.2] USE="cracklib nls pam -audit (-selinux) -skey" 1,661 kB

Total: 20 packages (17 upgrades, 1 new, 2 in new slots), Size of downloads: 32,043 kB

by admin at April 22, 2009 02:15 PM

April 17, 2009

Docunext Technology

Compiling Epiphany-Webkit from Subversion

I finally found the epiphany subversion repository so I’m trying to build it.

Requested 'gtk+-2.0 >= 2.16.0' but version of GTK+ is 2.14.7
Requested 'gtk+-unix-print-2.0 >= 2.16.0' but version of GTK+ is 2.14.7

I installed the libgtk from sid which allowed it to compile and install, but I get this error when I try to run it:

undefined symbol: gtk_entry_set_icon_drag_source

Hmm, can’t figure that one out. Guess I’ll have to wait for some upgrades.

Ugh, several hours later I realized that by upgrading these packages:

ii  gtk2-engines-pixbuf                    2.16.1-2                           Pixbuf-based theme for GTK+ 2.x
ii  libgail-common                         2.16.1-2                           GNOME Accessibility Implementation Library -- commo
ii  libgail-dev                            2.16.1-2                           GNOME Accessibility Implementation Library -- devel
ii  libgail18                              2.16.1-2                           GNOME Accessibility Implementation Library -- share
ii  libgtk2.0-0                            2.16.1-2                           The GTK+ graphical user interface library
ii  libgtk2.0-dev                          2.16.1-2                           Development files for the GTK+ library

I could no longer print in iceweasel. It would cause a segmentation fault and crash / quit immediately after I tried bringing up the print dialog. I downgraded with something along these lines:

apt-get install libgtk2.0-0=2.14.7-5 libgail18=2.14.7-5 libgtk2.0-dev=2.14.7-5  gtk2-engines-pixbuf=2.14.7-5 libgail-common=2.14.7-5  libgail-common=2.14.7-5  libgail-common=2.14.7-5 

and now I can print again. I found a bug in the debian database about a potential conflict with libcairo. Who knows?

by Albert at April 17, 2009 03:44 AM

April 14, 2009

Docunext Forums

Mongoose

This is a very interesting server - its wicked small! mongoose.c It was written by Sergey Lyubka.

by admin at April 14, 2009 09:17 AM

Multi-site

After spending a bunch of time and effort setting up PhunkyBB to support multiple sites in a single database, I feel a bit of regret for having removed multi-site database support for Sycaless. It was a learning experience, maybe I'll add it back!

by admin at April 14, 2009 09:14 AM

Docunext Technology

pfSense Load Balancer Sticky States

As a follow-up to this post from two years ago (!!) How I use Apache behind pfSense, I think I may have solved a similar problem with HTTP authentication, trac, and the pfSense sticky states balancer.

I wrote up a little javascript keepalive (will publish soon), turned off the Keepalive in Apache, and it seems to work fine. Previously it would log me out randomly, because the load balancer had switched backends.

Hmmm, its very strange because it just switched again. I wish I knew why it was not remaining a sticky connection. The blurb doc says as long as there is a connection, it stays sticky. Hence the keepalive, but its apparently not working. :-(

Aha - I think I may have figured it out. I was connecting to other back-ends through the load balancer which had different keepalive settings. I wish the keepalive settings worked.

There are many facets to this situation: http keepalive, tcp keepalive, pf states, proxies, and more I’m not thinking of at the moment. Its very interesting though.

by Albert at April 14, 2009 05:42 AM

April 13, 2009

Docunext Technology

Browser User Agents

There are many types of user agents, but I’d rather not have to keep track of them all. I’ve been thinking about trying to keep it simple, so I’ve come up with these categories as an idea:

  • msie - I do not like Microsoft products
  • standard - I like standard compliant browsers
  • bots - web crawlers, w3m, lynx, etc.

by Albert at April 13, 2009 11:41 PM

April 10, 2009

Docunext Forums

April 06, 2009

Docunext Technology

Celebrate! Its an Official Debian Port: GNU/kFreeBSD

This is wonderful news: the Debian GNU/kFreeBSD distribution is now official. I’ve been very impressed with this port for quite some time now and am very pleased to see it available in all the debian repositories.

Congratulations to all the debian people on another huge step forward!

If you want to help out, there is a TODO file for the Debian GNU/kFreeBSD port here.

by Albert at April 06, 2009 10:53 PM

April 04, 2009

Docunext Technology

Markdown2pdf formatting

Markdown is a very simple syntax for stylizing documents. I really like it because it works for both plain text ASCII documents and when its converted to HTML or something similar.

I’m starting to use it for letter writing, something I enjoy doing very much. I write the letter using Markdown syntax and then convert the text file to PDF using, what else, markdown2pdf, part of pandoc. My first few letters were hardly formatted at all just using the resulting HTML layout features: paragraphs and line breaks.

Reading up on the pandoc tools, I decided I needed to learn about latex documents. That was the key - I was able to get a larger font size with this latex header:

\documentclass[12pt]{amsart}
\setlength{\parindent}{0pt}
\setlength{\parskip}{12pt plus 2pt minus 1pt}

and this command:

markdown2pdf -C test.latex my_markdown_letter.txt

by Albert at April 04, 2009 08:50 AM

April 02, 2009

Docunext Technology

Pragma Header Crashing Webkit?

Recent Webkit builds were crashing on my Wordpress sites and I finally tracked down the problem. The K2 theme sends a Pragma header for some javascript files, and removing that header call stopped Webkit from crashing. Hooray!

Webkit shouldn’t crash because of that header, but I don’t want K2 to send it anyway.

UPDATE: Actually it was the charset text after the content-type header:

-	header('Content-Type: text/javascript; charset: UTF-8');
+	header('Content-Type: text/javascript;');

by Albert at April 02, 2009 09:05 AM

Turn off webcam

A recent run of powertop discovered that the webcam in my Acer Extensa 5620Z was causing a significant amount of wakeups. I never use it, in fact its covered up with a sticker.

[    6.888500] usb 1-1: Product: Acer CrystalEye webcam
[   15.287631] uvcvideo: Found UVC 1.00 device Acer CrystalEye webcam (064e:a101)
[   15.288506] input: Acer CrystalEye webcam as /class/input/input6

zzillezz.net turned a similar webcam off with “blacklist gspca”. I’m using “blacklist uvcvideo”.

While I was at it, I also blacklisted a few other modules to save RAM as my laptop recently lost 2GB of RAM. :-(

by Albert at April 02, 2009 05:25 AM

SGi

I’m surprised to learn that graphics powerhouse Silicon Graphics is being sold for only $25 million dollars to Rackable Systems. I hadn’t heard their name for a few years, but I always regarded them as a quality company.

I read a little into the story and learned that they have a few hundred million dollars worth of assets, but several hundred dollars worth of debt. Ouch!

by Albert at April 02, 2009 04:00 AM

April 01, 2009

Docunext Technology

X11 / Iceweasel Display Fix

I was reading up on Webkit optimizations and one of the suggestions was to use hardware acceleration on the video card. I’ve experimented extensively with graphics acceleration on my Everex Via C7 notebooks, but I’ve refrained from toying with the xorg.conf on my Acer Extensa 5620Z, simple because it worked out of the box with debian and I had no complaints.

I figured I’d give is a shot, found an xorg.conf configuration which said it was for the Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller, and lo and behold, a strange bug which had been plaguing my Iceweasel for months went away. I’m not sure if the two are related, but I’m *so* glad that the bug is gone.

I would have tried to track down the source of the problem before, but the problem is tough to describe. It only affected background images, and only affected them sometimes. The would appear 50% vertically offset - or so it would seem, something funky was going on with them.

I’m hoping that the new configuration actually enables some hardware acceleration, and maybe even cause my laptop to run a little cooler? Is that too much to ask for?

by Albert at April 01, 2009 12:08 AM

March 31, 2009

Docunext Forums

NGINX

I've been working with NGINX a lot lately. So far I'm very impressed, seems like a very solid and high quality server.

by admin at March 31, 2009 01:41 PM

NGINX

I've been working with NGINX a lot lately. So far I'm very impressed, seems like a very solid and high quality server.

by admin at March 31, 2009 01:41 PM

March 30, 2009

Docunext Technology

Wordpress Lightbox Plugin and jQuery 1.3+

I just found the solution to an annoying bug:

“[Exception… “‘Syntax error, unrecognized expression: [@rel*=lightbox]’ when calling method: [nsIDOMEventListener::handleEvent]” nsresult: “0×8057001e (NS_ERROR_XPC_JS_THREW_STRING)” location: “” data: no]”

This started after I upgraded jQuery to 1.3.2 from 1.2.x. The fix is:

Index: jquery-wp-lightbox/js/jquery.lightbox.js
===================================================================
--- jquery-wp-lightbox/js/jquery.lightbox.js	(revision 654)
+++ jquery-wp-lightbox/js/jquery.lightbox.js	(working copy)
@@ -501,7 +501,7 @@
 			var groups_n = 0;
 			var orig_rel = this.rel;
 			// Create the groups
-			$.each($('[@rel*='+orig_rel+']'), function(index, obj){
+			$.each($('[rel*='+orig_rel+']'), function(index, obj){
 				// Get the group
 				var rel = $(obj).attr('rel');
 				// Are we really a group

I also want to note that I had to do some serious snooping with K2 to figure out why jQuery’s dollar sign was causing a problem. Turns out that the k2 functions script disables it with:

jQuery.noConflict();

After commenting that out, it works! :-)

by Albert at March 30, 2009 08:51 AM

March 29, 2009

Docunext Technology

Tidy

Tidy is a nice little library which is used to to clean up HTML. Its been around for awhile, and from what I understand, it has been retained and maintained by a group of users after the original author, Dave Raggett, decided to halt upkeep.

There are many language bindings, and I’ve recently been using a lot more for converting HTML into valid XML, which can be transformed by XSLT into XHTML. Good stuff!

Docunext Wiki Page on Tidy

by Albert at March 29, 2009 11:00 PM

Docunext Forums

Cygwin

I just installed it on my Eee PC 900HA XP, though I haven't tested it out yet.

by admin at March 29, 2009 05:51 PM

Cygwin

I just installed it on my Eee PC 900HA XP, though I haven't tested it out yet.

by admin at March 29, 2009 05:51 PM

Back again

I recently setup an OpenVZ container for Gentoo, and it is nice to use it again after a few years. Gentoo was the second distribution I became familiar with, the first one being RedHat, and the subsequent one being debian. I wasn't able to setup ldap authentication on gentoo though, I'll have to keep working on that.

by admin at March 29, 2009 05:23 PM

NGINX

I've been posting a bunch of notes on NGINX lately, and figure I need to promote them more if they are to be useful: NGINX notes at the Docunext Wiki

by admin at March 29, 2009 05:11 PM

YoDNSConf

YoDNSConf has its own site now: YoDNSConf

by admin at March 29, 2009 02:42 PM

Docunext Technology

PHP, CSS and XML

I’m experimenting with PHP, CSS, and XML, trying to come up with some sort of css2xml script, while considering the idea of mangling classes and identifiers to prevent collisions when creating mashups.

<?php
require_once 'HTML/CSS.php';
require_once 'XML/Serializer.php';
$mycss = file_get_contents('test.css');
 
//$mycss = preg_replace('/#/','id___',$mycss);
//$mycss = preg_replace('/\n\./','class___',$mycss);
 
$css = new HTML_CSS();
$css->parseString($mycss);
 
//$arr = $css->toArray();
//var_export($arr);
ob_start();
$css->display();
$converted = ob_get_contents();
ob_end_clean();
//echo $converted;
 
//exit;
$mycss = preg_replace('/\n#/','id___',$converted);
$mycss = preg_replace('/\n\./','class___',$mycss);
$css->parseString($mycss);
$arr = $css->toArray();
 
//echo $converted;
//echo $mycss;
//exit;
 
$options = array(
  XML_SERIALIZER_OPTION_INDENT        => '    ',
  XML_SERIALIZER_OPTION_RETURN_RESULT => true
);
$serializer = &new XML_Serializer($options);
 
$result = $serializer->serialize($arr);
echo $result;
?>

Note, this code is just a sketch, and I don’t expect it to function well.

Also, of the post I made recently about css parsers, this one in ruby again caught my attention.

Lastly, I found csstoxml. Its written in java, so I’m a little hesitant to try it out due to my lack of experience with java.

by Albert at March 29, 2009 05:07 AM

March 28, 2009

Docunext Forums

Big Fan

I am a big fan of XML, so I've added this forum to talk about it more. One topic that's been bouncing around my head lately is the role of authentication in RSS / XML feeds. Something I want to think about more...

by admin at March 28, 2009 05:18 AM

March 27, 2009

Docunext Technology

Ruby Gems on Debian

I kept on getting:

/usr/bin/gem:14: undefined method `ruby_version' ...

on a debian machine whenever I tried using gem. I ended up commenting out a few lines, then installing the latest version of rubygems-update from here with:

gem install rubygems-update-1.3.1.gem

Looks like it worked, but not for the real problem I was trying to solve. This was to try and solve this problem:

ActionView::TemplateError (undefined method `[]'

Which was solved thanks to these pages:
Re: [SOVED] AJAX error: ActionView::TemplateError (undefined method `[]’..
and
undefined method for enumerable

The actual fix was to put:

unless '1.9'.respond_to?(:force_encoding)
  String.class_eval do
    begin
      remove_method :chars
    rescue NameError
      # OK
    end
  end
end

at the beginning of config/environment.rb.

by Albert at March 27, 2009 03:48 AM

March 26, 2009

Docunext Technology

Building Webkit SVN on Debian

Just some notes.

Requirements

* Libsoup
* Libproxy

apt-get install build-essential libcurl4-gnutls-dev  libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
apt-get install libgconf2-dev
apt-get build-dep webkit libsoup
svn co http://svn.gnome.org/svn/libsoup/trunk libsoup
svn checkout http://libproxy.googlecode.com/svn/trunk/ libproxy-read-only
svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit
CFLAGS="-msse -msse2 -msse3 -mtune=nocona" CXXFLAGS="${CFLAGS}" ./configure
make -j4

UPDATE - I’m trying out x86_64 support for JIT Javascript. (See 32 or 64bit for my complaints about architecture limitations.)

Result - I was able to compile Webkit and JIT javascript optimizations and it runs with epiphany, but I’m not sure if its really doing anything.

by Albert at March 26, 2009 03:23 AM

March 25, 2009

Docunext Technology

32 or 64?

I have to say that it is indeed tempting from time to time to switch back to 32-bit. Occasionally I find programs which run only on 32-bit: flash, squirrelfish, and chromium.

But I’m sticking with 64 bit as much as I can. I will obviously continue to use 32 bit on machines that don’t support 64! That includes some of my development machines, a backup notebook, a netbook, and my pfSense firewalls.

by Albert at March 25, 2009 11:43 AM

CSS Parsers

After briefly thinking about Javascript parsers, I did a quick search for CSS parsers, and found, as El Guapo might say, a plethora of piñatas.

Here’s a few which caught my attention:

I’m really intrigued that there are so many parsers written in Ruby.

by Albert at March 25, 2009 08:18 AM

March 24, 2009

Docunext Technology

html2dom.js / xhtml2dom.xsl

I’ve been evaluating different strategies for caching parts of an XHTML page, like a header, footer, or sidebar. I’ve come to the conclusion that the best way to do this is to store the xhtml as a dom object in javascript. It could also be stored as plain XHTML, but then there are issues with multi-line strings in javascript.

It would be possible to use E4X (EMCAscript for XML), but that is not widely supported by browsers yet.

So anyway back to Javascript DOM code. Its not as simple to write as HTML, and there are many convenience packages to help this, but I’m under the impression that may reduce its efficiency.

I did some searching on ways to generate Javascript DOM code from XHTML found html2dom. It does exactly what I was looking for, but the code doesn’t have an explicit license. The author states on another page that the code is in the public domain, but I would feel more comfortable if that were included in the code itself.

Then there is the issue that I don’t have a server-side javascript interpreter setup. These are somewhat rare, though they are getting much more prevalent, and I expect that to continue. Since I’m a big fan of XSLT, I’ve decided to try writing a stylesheet which would convert xhtml to dom code. Its very rough at this point, but I’m checking it into the PBooks repository and will post a link once its published. The only real hurdle I ran into was dealing with multi-line text nodes. As usual, they cause some problems with javascript, but I just used the translate function to remove all newlines. I also ran into an issue that the style attribute is read-only. Not a big deal, I need to refrain from using in-line CSS anyway. The stylesheet is basically an identity transform that converts XML to Javascript DOM instructions. Another cool thing about this is that the resulting dom code can be gzipped and cached as long as it doesn’t change too much. That is a good thing!

Here is a link to the first revision of xhtml2dom.xsl.

I like how this is working. For some reason, I’m now thinking about javascript parsers. Does such a thing exist? I think it would be possible to create one using Ragel. Here is one implemented in Ruby: rbNarcissus (and a backup of the code here).

UPDATE: Instead of the translate function for newlines, I’m using the normalize-whitespace function suggested here at xmlplease.com/whitespace.

by Albert at March 24, 2009 10:51 PM

pfSense Hackathon

The pfSense hackathon is over, and I’m skimming through the change logs. Looks like most of the changes were to the 2.0 branch, which I’ve only tried on a virtual machine, but it looked nice.

Clog is gone, replaced by fifolog, and is it true? Ftp proxy is gone? Nice, I never liked that. Instead I use NAT for a few hundred ports in the 65000 range, and that seems to work much better. I set the same range in proftpd.conf and its good to go. Looks like they are using the prototype javascript framework ( I prefer jQuery ).

In other news, the pfSense folks are adding some services to the pfSense offering, and so far it looks terrific. There is now (or soon to be) the ability to save your configuration to a secure service. Nice work people!

I should also note that the glxsb (Geode LX Security Block) kernel module continues to run well on my ALIX board. Excellent!

by Albert at March 24, 2009 01:33 AM

Chromium on Ubuntu?

I was surprised to find that Ubuntu has a package for Chromium - the open source browser from Google. It uses the WebKit HTML engine, and a new javascript engine called V8.

I love trying out new stuff, so I managed to hack it into my debian laptop, but (I guess due to ia32 / gtk differences) the browser won’t display any pages, everything just shows up blank.

I then started to try and install on a 32-bit ubuntu machine, but of course I also decided to upgrade it to Jaunty Jackalope. Jaunty is still in alpha, so I wasn’t surprised to find its wasn’t a totally smooth upgrade. I’m still working on it… well the upgrade is done and everything looks good. Unfortunately, I’m still getting blank screens with Chromium. :-(

Turns out I just needed to install the Microsoft fonts installer package. After that, it started to display pages. Let’s see if that works for on my Debian 64-bit machine:

apt-get install ttf-mscorefonts-installer

Nope, I guess I already had that installed.

I noticed on the opening screen that blogging is discouraged. That’s too bad, I disagree with the statement that it doesn’t help.

by Albert at March 24, 2009 12:01 AM

March 23, 2009

Docunext Forums

Artwork

Ubuntu has done a terrific job with artwork for their interfaces, building upon the wonderful work of freedesktop.org.

by admin at March 23, 2009 11:27 AM

March 22, 2009

Docunext Technology

Say No to Strings

I’m sticking with XSL, XML and DOM, so I’m trying to free myself of strings. I had a tough time dropping disable-output-escaping, as I first tried xsl:copy-of, which resulted in an empty xmlns attribute in xhtml docs.

I finally remembered that the nodes just have to be rebuilt, either using xsl:element or the new elements entirely. Now to try and keep things flexible, I’ll need to craft up some xsl:templates for common html elements. So far I’ve got script and link, but of course I’ll need a whole bunch more than that.

Also, attribute sets!

Hah, well its actually not that difficult. All that was needed was an identity transform which avoids copy and copy-of. Thanks to Ben, its really quite simple!

<xsl:template match="node()">
<xsl:element name="{name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
 
<xsl:template match="@*|text()|comment()|processing-instruction()">
<xsl:copy/>
</xsl:template>

by Albert at March 22, 2009 11:04 PM