All of the interesting technological, artistic or just plain fun subjects I'd investigate if I had an infinite number of lifetimes. In other words, a dumping ground...

Friday 30 May 2008

Sunlight & GNU Scientific library

Bending the sun's rays to light high-tech buildings


GSL - GNU Scientific Library

Introduction

The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. It is free software under the GNU General Public License.

The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.

The complete range of subject areas covered by the library includes,

Complex Numbers Roots of Polynomials
Special Functions Vectors and Matrices
Permutations Sorting
BLAS Support Linear Algebra
Eigensystems Fast Fourier Transforms
Quadrature Random Numbers
Quasi-Random Sequences Random Distributions
Statistics Histograms
N-Tuples Monte Carlo Integration
Simulated Annealing Differential Equations
Interpolation Numerical Differentiation
Chebyshev Approximation Series Acceleration
Discrete Hankel Transforms Root-Finding
Minimization Least-Squares Fitting
Physical Constants IEEE Floating-Point
Discrete Wavelet Transforms Basis splines

Wednesday 28 May 2008

Google AJAX library hosting

What is the AJAX Libraries API?

The AJAX Libraries API is a content distribution network and loading architecture for the most popular open source JavaScript libraries. By using the Google AJAX API Loader's google.load() method, your application has high speed, globaly available access to a growing list of the most popular JavaScript open source libraries including:

Google works directly with the key stake holders for each library effort and accept the latest stable versions as they are released. Once we host a release of a given library, we are committed to hosting that release indefinitely.

The AJAX Libraries API takes the pain out of developing mashups in JavaScript while using a collection of libraries. We take the pain out of hosting the libraries, correctly setting cache headers, staying up to date with the most recent bug fixes, etc.


http://ajaxian.com/archives/announcing-ajax-libraries-api-speed-up-your-ajax-apps-with-googles-infrastructure

http://code.google.com/apis/ajaxlibs/

Authentication, passwords, hashing and salts for web applications

Hardened stateless session cookies

May 16th, 2008 at 12:40 UTC by Steven J. Murdoch

The root cause behind the last-but-one Wordpress cookie debacle was that the authors invented their own password hashing and cookie generation scheme. This is generally a bad idea, since it's hard even for experts to get these right. Instead, whenever possible, a well-studied proposal should be chosen. It is for this reason that I suggested the phpass library for password hashing, and the Fu et al. stateless session cookie proposal.


Portable PHP password hashing framework

Please note that password hashing is often wrongly referred to as "password encryption". Hashing is a more appropriate term since encryption is something that is supposed to be easily reversible.

This is a portable public domain password hashing framework for use in PHP applications. It is meant to work with PHP 3 and above, and it has actually been tested with at least PHP 3.0.18, 4.3.x, 4.4.x, 5.0.x, 5.1.x, and 5.2.x so far.


Openwall Project
bringing security into open environments

Software you can find here:

Secure Programming for Linux and Unix

Secure Programming for Linux and Unix HOWTO -- Creating Secure Software

Picture of David A. Wheeler This is the main web site for David Wheeler's free book, the Secure Programming for Linux and Unix HOWTO. This book provides a set of design and implementation guidelines for writing secure programs for Linux and Unix systems. Such programs include application programs used as viewers of remote data, web applications (including CGI scripts), network servers, and setuid/setgid programs. This document includes specific guidance for a number of languages, including C, C++, Java, Perl, Python, and Ada95. I give this book away in the hope that future software developers won't repeat past mistakes, resulting in more secure systems.

Monday 26 May 2008

Finance application - Buddi

Buddi

Buddi is a personal finance and budgeting program, aimed at those who have little or no financial background. In making this software, I have attempted to make things as simple as possible, while still retaining enough functions to satisfy most home users.

Screenshot of Buddi's transaction screen

Buddi is released as Open Source Software. You can download it for free, with no disabled features and no time limit. If you find that you like it, and that it has helped you to organize your finances, I would greatly appreciate a small donation via the link at the bottom of the page. I have spent thousands of hours of my own time perfecting Buddi - while I am not doing this for the money, I do need to support myself and my family, and every little bit helps.

Buddi will run on almost any computer which has a Java virtual machine installed. This can include Windows, Macintosh OS X, Linux, and many other operating systems.

Screenshot of one of Buddi's reporting features

Buddi is currently available in multiple languages. If you are interested in translating to another language, feel free to do so! I would greatly appreciate it if you also sent me the translated file once you are finished. For more details, please see the translations page.

Buddi is released under the GNU General Public License. Since Buddi is released as Open Source Software, everyone has free access to the source code (available for download from the SourceForge project page). This gives you the ability to modify the program if you want it to work a little differently, or if you want to add some new features. For more information on Open Source Software in general, and the GNU General Public License in particular, you can refer to Wikipedia.

Friday 23 May 2008

Git to CVS and back again

Importing in to Git is easy. Pushing back into CVS is hard mostly because you have to find the SHA1 commit message and use that to apply the patch.
There are scripts that do it automatically - not sure how good these are.
http://www.kernel.org/pub/software/scm/git-core/docs/v1.0.13/cvs-migration.html
http://chneukirchen.org/blog/archive/2006/04/tracking-the-ruby-cvs-with-git.html
git-cvsimport
http://www.kernel.org/pub/software/scm/git/docs/git-cvsexportcommit.html
Merge one patch into CVS
$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
$ git-cvsexportcommit -v <commit-sha1>
$ cvs commit -F .msg <files>
Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo
        $ git-cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>
Merge pending patches into CVS automatically — only if you really know what you are doing
$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
$ git-cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git-cvsexportcommit -c -p -v
https://wiki.bnl.gov/dayabay/index.php?title=Synchronizing_Repositories
http://tsunanet.blogspot.com/2007/07/git-cvs-in-5min.html
http://issaris.blogspot.com/2005/11/cvs-to-git-and-back.html
http://www.kernel.org/pub/software/scm/git/docs/git.html

Google Doctype & Compiere open source ERP & CRM

What do you want to learn today?

Read HOWTO articles on

Dive into DOM objects, including

Style your pages with CSS


Compiere ERP and CRM Product Overview

Compiere is changing the economics of enterprise applications by making Enterprise Resource Planning (ERP) and Customer Relationship Management (CRM) easier. Easier to acquire. Easier to implement. Easier to extend. Easier to change.

Easier, Adaptable and Affordable ERP and CRM

Compiere delivers powerful ERP and CRM capabilities that are built on an innovative Model-driven Applications platform.

Thursday 22 May 2008

DNS

What is MaraDNS ?

MaraDNS is a package that implements the Domain Name Service (DNS), an essential internet service.

Dnsmasq

Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server. It is designed to provide DNS and, optionally, DHCP, to a small network. It can serve the names of local machines which are not in the global DNS. The DHCP server integrates with the DNS server and allows machines with DHCP-allocated addresses to appear in the DNS with names configured either in each host or in a central configuration file. Dnsmasq supports static and dynamic DHCP leases and BOOTP/TFTP for network booting of diskless machines.

Dnsmasq is targeted at home networks using NAT and connected to the internet via a modem, cable-modem or ADSL connection but would be a good choice for any smallish network (up to 1000 clients is known to work) where low resource use and ease of configuration are important.


NSD - Name Server Daemon

NSD is an authoritative only, high performance, simple and open source name server. The current stable release is NSD 3.0.8.



Thursday 15 May 2008

GCC FORTIFY_SOURCE



GCC compile time buffer checks (FORTIFY SOURCE)

In Fedora Core 3 and Red Hat Enterprise Linux 4, gcc and glibc gained a feature called "FORTIFY_SOURCE" that will detect and prevent a subset of the buffer overflows before they can do damage. While this feature is present in these two releases, it's not used for significant portions of the Fedora Core 3 and Red Hat Enterprise Linux 4 distributions itself. This is different for Fedora Core 4; here almost the entire distribution is compiled with this feature enabled.

The idea behind FORTIFY_SOURCE is relatively simple: there are cases where the compiler can know the size of a buffer (if it's a fixed sized buffer on the stack, as in the example, or if the buffer just came from a malloc() function call). With a known buffer size, functions that operate on the buffer can make sure the buffer will not overflow.

Example:

void foo(char *string)
{
char buf[20];
strcpy(buf, string);
}

In the example, gcc knows that the buf variable is 20 bytes in size. When this code is compiled with FORTIFY_SOURCE enabled, gcc uses a special version of strcpy() which asks gcc for the the size of the destination buffer. Since the size is known (here, 20 bytes), the strcpy() code will not copy after 20 bytes. If there is more than 20 bytes to copy, the program is aborted. If gcc proves at compile time that this buffer will overflow, it also issues a warning.

There are many functions in the standard glibc library that operate on buffers. In Fedora Core 4, the majority of these functions use this extra information from gcc to do the sanity checks.

The FORTIFY_SOURCE feature can be enabled for your own application in Fedora Core 3 and 4 and Red Hat Enterprise Linux 4 by passing the following argument to gcc:

-D_FORTIFY_SOURCE=2

You can see how often a checking function is used in an application via the following command:

objdump -d <program or library> | grep call | grep _chk | wc -l

If this is non-zero, FORTIFY_SOURCE is active. However if the value returned is zero, FORTIFY_SOURCE either might not be enabled, or the program code is such that FORTIFY_SOURCE is not applicable (for example: secure code that has no static buffers and always checks buffer sizes, and thus FORTIFY_SOURCE cannot identify any potentially dangerous operations in the program).


IPv6

http://go6.net/
1.Register
2.Download a client
3.Connect
4. ???
5. Profit!

Tuesday 13 May 2008

Thursday 8 May 2008

more NTP scripts

http://saturn.dennishilberg.com/gathering_data.php

NTP Performance Monitoring, Client Stats, Data Plotting


How to determine if you program is using MMX, SSE and SSE2 extensions on Linux with GCC

1. compile for your particular processor, generating assembly files. Just use your normal compile command line and add -S and -march=
g++  -g -Wall -march=pentium4 -O2 -S -I.. *.cc
2. search through the .s files for the new instructions and xmm registers listed on this page: http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions
eg.
fgrep "movss" *.s  | grep -v "\.string" -
fgrep "xmm" *.s  | grep -v "\.string" -

I found that it used xmm0 now and then but only used a couple of the new instructions a couple of times.
It makes me wonder if this will make it slower because it has to save the extra registers on to the stack every time. I can only assume GCC is smart enough so it knows it doesn't have to do this.

Tuesday 6 May 2008

mapping #include files using dot and graphviz


grep "#include" *.c* | grep -v "<" - | grep -v "//" - > includes.txt
grep "#include" *.h | grep -v "<" - | grep -v "//" - >> includes.txt
Then modify the .txt file in VI and save it as .dot


digraph yms_dep {
allocate_main -> Yard;
allocate_main -> Slot;
allocate_main -> yard_shm_daem;
allocate_main -> cont;
allocate_main -> ContainerHelper;
allocate_main -> ECShmem;
allocate_main -> YtoHtml;
Allocation -> Slot;
Allocation -> XMLListener;
Allocation -> Allocation;
AllocationFilter -> AllocationFilter;
AllocationFilter -> Slot;
allocationtimes -> allocationtimes;
alloclistener -> ServerSocket;
alloclistener -> SocketException;
alloclistener -> Slot;
alloclistener -> Yard;
alloclistener -> alloclistener;
ban -> ContainerHelper;
ban -> ban;
bannedSlots -> ContainerHelper;
bannedSlots -> bannedSlots;
berths -> ContainerHelper;
berths -> stat;
berths -> Vessels;
berths -> VesselNotFoundException;
berths -> berths;
BestAlloc -> BestAlloc;
BestAllocsList -> BestAllocsList;
BestAllocsList -> Lock;
Block -> ReeferRow;
Block -> ContainerNotFoundException;
Block -> Block;
Ches -> Ches;
client -> ClientSocket;
client -> SocketException;
ClientSocket -> ClientSocket;
ClientSocket -> SocketException;
concreteObserver -> ContainerHelper;
concreteObserver -> concreteObserver;
concreteSubject -> concreteSubject;
Conslist -> ContainerHelper;
Conslist -> Statistics;
Conslist -> SocketException;
Conslist -> Lock;
Conslist -> tcp_msg;
Conslist -> Message;
Conslist -> Conslist;
Consol -> NullWiException;
Consol -> XMLListener;
Consol -> Ches;
Consol -> Consol;
ContainerHelper -> ContainerHelper;
ContainerHelper -> Yard;
ContainerHelper -> ContainerNotFoundException;
CostFunction -> CostFunction;
ctr_key_dump -> Yard;
ctr_key_dump -> Slot;
ctr_key_dump -> yard_shm_daem;
ctr_key_dump -> cont;
ctr_key_dump -> ContainerHelper;
ctr_key_dump -> ECShmem;
ctr_key_dump -> Wis;
ctr_key_dump -> WorkInst;
Delays -> Delays;
ECShmem -> ECShmem;
ExtAlloc -> ExtAlloc;
ExtAlloc -> Allocation;
hazslots -> ContainerHelper;
hazslots -> stat;
hazslots -> hazslots;
hideslots -> ContainerHelper;
hideslots -> stat;
hideslots -> hideslots;
json_spirit_reader -> json_spirit_reader;
json_spirit_reader -> json_spirit_value;
json_spirit_value -> json_spirit_value;
json_spirit_writer -> json_spirit_writer;
json_spirit_writer -> json_spirit_value;
Lock -> Lock;
Log -> Log;
main -> Yard;
main -> XMLListener;
main -> yms;
main -> statagg;
main -> alloclistener;
Message -> Message;
Nodes -> Block;
Nodes -> Row;
Nodes -> Nodes;
Nodes -> berths;
oow -> oow;
Oows -> Oows;
OptimizerJob -> OptimizerJob;
OptimizerJobsList -> Yard;
OptimizerJobsList -> OptimizerJobsList;
OptimizerJobsList -> WorkInst;
Parameters -> Parameters;
Params -> Params;
Params -> OptimizerJobsList;
Params -> Block;
Params -> Yard;
Params -> env;
Params -> ContainerNotFoundException;
Params -> VesselNotFoundException;
Params -> Statistics;
Params -> ContainerHelper;
Params -> berths;
reeferbay -> ContainerHelper;
reeferbay -> stat;
reeferbay -> reeferbay;
ReeferRow -> Block;
ReeferRow -> ReeferRow;
ReeferRow -> ContainerNotFoundException;
Row -> Row;
Row -> Block;
Row -> Yard;
Row -> ContainerHelper;
Row -> ContainerNotFoundException;
Row -> stat;
ServerSocket -> ServerSocket;
ServerSocket -> SocketException;
Slot -> Yard;
Slot -> Block;
Slot -> Row;
Slot -> ContainerHelper;
Slot -> ydslot;
Slot -> ContainerNotFoundException;
Slot -> Slot;
Socket -> Socket;
Socket -> SocketException;
statagg -> Block;
statagg -> reeferbay;
statagg -> statagg;
stat -> load_ctr;
stat -> ContainerHelper;
stat -> stat;
Statistics -> Statistics;
Statistics -> Allocation;
Statistics -> ContainerNotFoundException;
Statistics -> VesselNotFoundException;
str_to_time_t -> str_to_time_t;
tier -> tier;
truckArea -> ContainerHelper;
truckArea -> stat;
truckArea -> truckArea;
Vessel -> ContainerHelper;
Vessel -> XMLListener;
Vessel -> Vessel;
Vessels -> ContainerHelper;
Vessels -> XMLListener;
Vessels -> Vessels;
Wis -> Wis;
Wis -> Block;
Wis -> Yard;
WorkInst -> ec;
WorkInst -> ECShmem;
WorkInst -> NullWiException;
WorkInst -> Block;
WorkInst -> XMLListener;
WorkInst -> WorkInst;
XMLListener -> BestAllocsList;
XMLListener -> ContainerNotFoundException;
XMLListener -> Conslist;
XMLListener -> ServerSocket;
XMLListener -> SocketException;
XMLListener -> XMLListener;
XMLListener -> VesselNotFoundException;
XMLListener -> berths;
XMLListener -> truckArea;
XMLListener -> stat;
XMLListener -> oow;
Yardcom -> Yardcom;
Yardcom -> SocketException;
Yard -> yard_shm_daem;
Yard -> cont;
Yard -> Params;
Yard -> Nodes;
Yard -> Vessels;
Yard -> VesselNotFoundException;
Yard -> Yard;
yms -> eclimits;
yms -> SocketException;
yms -> ContainerHelper;
yms -> ContainerNotFoundException;
yms -> YtoHtml;
yms -> yms;
YtoHtml -> Block;
YtoHtml -> Row;
YtoHtml -> Slot;
YtoHtml -> ContainerHelper;
YtoHtml -> YtoHtml;
AllocationFilter -> Wis;
AllocationFilter -> Slot;
AllocationFilter -> Ches;
AllocationFilter -> Yard;
AllocationFilter -> Log;
AllocationFilter -> bannedSlots;
Allocation -> Slot;
alloclistener -> Yard;
alloclistener -> Params;
alloclistener -> yms;
ban -> bannedSlots;
ban -> ContainerHelper;
bannedSlots -> cont;
bannedSlots -> ContainerHelper;
bannedSlots -> Slot;
berths -> concreteObserver;
berths -> concreteSubject;
berths -> stat;
berths -> Nodes;
berths -> Yard;
BestAlloc -> Allocation;
BestAlloc -> Slot;
BestAlloc -> Block;
BestAllocsList -> Consol;
Block -> Slot;
Block -> Row;
Block -> Allocation;
Block -> Params;
Block -> Yard;
Block -> concreteObserver;
Block -> concreteSubject;
Block -> stat;
Block -> reeferbay;
Ches -> ECShmem;
Ches -> Oows;
Ches -> Wis;
Ches -> WorkInst;
ClientSocket -> Socket;
ClientSocket -> Message;
concreteObserver -> cont;
concreteObserver -> observer;
concreteSubject -> cont;
concreteSubject -> subject;
concreteSubject -> concreteObserver;
Conslist -> Consol;
Conslist -> Log;
Conslist -> Wis;
Conslist -> Yardcom;
Conslist -> Statistics;
Consol -> Slot;
Consol -> WorkInst;
Consol -> Allocation;
ContainerHelper -> cont;
ContainerHelper -> Reefer;
ContainerNotFoundException -> Exception;
CostFunction -> Params;
Delays -> Statistics;
ECShmem -> ecipc;
ExtAlloc -> Allocation;
hazslots -> concreteObserver;
hazslots -> stat;
hideslots -> concreteObserver;
hideslots -> stat;
json_spirit -> json_spirit_value;
json_spirit -> json_spirit_reader;
json_spirit -> json_spirit_writer;
json_spirit_reader -> json_spirit_value;
json_spirit_writer -> json_spirit_value;
Nodes -> Row;
Nodes -> Block;
Nodes -> Yard;
NullWiException -> Exception;
observer -> cont;
oow -> BestAllocsList;
oow -> Conslist;
Oows -> ECShmem;
OptimizerJob -> ecipc;
OptimizerJobsList -> OptimizerJob;
OptimizerJobsList -> Yard;
OptimizerJobsList -> Row;
Params -> Slot;
Params -> CostFunction;
Params -> Statistics;
Params -> Wis;
Params -> Ches;
Params -> ContainerHelper;
Params -> Yard;
reeferbay -> concreteObserver;
reeferbay -> concreteSubject;
reeferbay -> stat;
ReeferRow -> Row;
Row -> Slot;
Row -> Block;
Row -> Yard;
Row -> Allocation;
Row -> concreteObserver;
Row -> concreteSubject;
Row -> stat;
Row -> Reefer;
ServerSocket -> Socket;
Slot -> cont;
Slot -> yard_shm_daem;
Slot -> Reefer;
Slot -> concreteSubject;
Slot -> concreteObserver;
Slot -> tier;
Slot -> ban;
SocketException -> Exception;
Socket -> Message;
statagg -> Yard;
stat -> load_ctr;
Statistics -> Row;
Statistics -> Slot;
Statistics -> Yard;
Statistics -> Log;
Statistics -> WorkInst;
subject -> cont;
subject -> concreteObserver;
tier -> concreteSubject;
truckArea -> concreteObserver;
truckArea -> stat;
VesselNotFoundException -> Exception;
Vessels -> yard_shm_daem;
Vessels -> Vessel;
Wis -> ECShmem;
Wis -> Slot;
Wis -> WorkInst;
WorkInst -> ecshm;
WorkInst -> ECShmem;
WorkInst -> NullWiException;
WorkInst -> Slot;
WorkInst -> Row;
XMLListener -> yms;
XMLListener -> Yard;
Yardcom -> ClientSocket;
Yard -> Slot;
Yard -> Block;
Yard -> Allocation;
Yard -> yard_shm_daem;
Yard -> Params;
Yard -> Wis;
Yard -> Ches;
Yard -> Nodes;
Yard -> Vessels;
Yard -> Vessel;
Yard -> concreteObserver;
Yard -> stat;
Yard -> tier;
Yard -> truckArea;
Yard -> berths;
Yard -> hazslots;
Yard -> hideslots;
Yard -> allocationtimes;
yms -> sock;
yms -> tcp_msg;
yms -> Delays;
yms -> Yard;
yms -> Consol;
yms -> wi;
yms -> Statistics;
yms -> Params;
yms -> Parameters;
yms -> Wis;
yms -> Yardcom;
yms -> WorkInst;
yms -> AllocationFilter;
yms -> YtoHtml;
yms -> oow;
yms -> Log;
YtoHtml -> Slot;
YtoHtml -> Yard;
}

dot -Tpng includes.dot -o includes.png

Gmail IMAP and virtual box


Gmail IMAP


VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL). See "About VirtualBox" for an introduction.

Presently, VirtualBox runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.


tim's shared items

Add to Google Reader or Homepage