Search This Blog

2009-12-23

PostgreSQL over SSH tunnel

17.9. Secure TCP/IP Connections with SSH Tunnels

ssh -L 3333:localhost:5432 joe@foo.com
psql -h localhost -p 3333 postgres

Magic numbers...

And our debian server installation size at the moment is:

6291456 - (3808624 - (286884 + 2788684)) = 5558400

2009-12-20

how do you keep http service running as a non privileged user and bound to port 80?

1. get the server running on 8080
2. in the startup script before the actual server start command add:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

2009-10-01

Sweet Home 3D

Sweet Home 3D is a free interior design application that helps you place your furniture on a house 2D plan, with a 3D preview.

Very easy to use.

2009-09-23

Stratego/XT

Stratego/XT is a language and toolset for program transformation.

Step-By-Step: Moving Your Server To Linux

Step-By-Step: Moving Your Server To Linux

haXe

http://haxe.org

Programming language similar to JavaScript, but with full-featured type system and generics. The command-line compiler can generate Flash SWF files for client-side use, Neko bytecode for server-side use on Apache, or JavaScript using Browser DHTML API to create AJAX web applications.

2009-09-11

Yola free Webhosting small review...

Yola | Build a Free Website

Downs:
.Free styles suck and are few, and that would be Ok but....
.You cannot build your own style.
.U must have to their logo on the page...
But what's really bad is that the logo appears badly formated (at least in my firefox).
. If you wish to use your domain name it must be www.your-domain.net instead of allowing you to use any-virtual-host.your-domain.net.

Ups:
. You may download the site in a zip file to be published in a server with (at least) php support.
. Their site tool is simple and rigid, but seams to work nice.

2009-08-27

codepad.org

codepad
codepad.org is an online compiler/interpreter, and a simple collaboration tool.

2009-08-23

HOWTO: CPU Frequency Scaling w/ Kernel Module

http://ubuntuforums.org/showthread.php?t=248867

C++ fails on my logic...

union u1 {
char[0];
long[0];
}

union u2 {
char[1];
}

union u3 {
char;
long;
}

union u4 {
char;
long[0];
}

union u5 {
char[1];
long[0];
}

// i can undesrtand these...
sizeof(u1); // 0
sizeof(u2); // 1
sizeof(u3); // 8

// but these do not make sense to me...
sizeof(u4); // 8... not 1?
sizeof(u5); // 8... not 1?

// found this when trying to code this:

template <unsigned int unitSize = 1, unsigned int length = 1>
union Bytes {
char c[length * (unitSize / sizeof(char))];
bool b[length * (unitSize / sizeof(bool))];
short s[length * (unitSize / sizeof(short))];
int i[length * (unitSize / sizeof(int))];
long l[length * (unitSize / sizeof(long))];
float f[length * (unitSize / sizeof(float))];
double d[length * (unitSize / sizeof(double))];
long double ld[length * (unitSize / sizeof(long double))];
};

2009-08-20

Enabling Rich Text Editing in your web page...

Midas Specification
Given a document, you can add the attribute "designMode" and set it to "on" to get an editable document. For example, in JavaScript, if you have an iframe with an id of 'edit', you can get its contentDocument and set designMode to "on" like this:
document.getElementById("edit").contentDocument.designMode="on";

2009-08-15

Electronic whiteboard for Linux (ubuntu)

Linux Tips: Electronic whiteboard for Linux (ubuntu)
How to convert our computer screen on to a digital electronic whiteboard, under Linux, could not be simpler. Only need a knob for Wii (Nintendo Console), an infrared emitter (such as a remote control), and the software for it...

Wii Remote