Jump to content

Bit Hunter

Active Members
  • Posts

    158
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Bit Hunter

  1. I am thinking about linking two computer, one with processing power and one with storage.

    But cannot decide with interface to use, i want something on the cheap side, but with 3Gbps+ speed, also don;t want to go via a switch or any other "hardware" in between, just a 1m cable.

    It would have been ideally to use 1Gbps ethernet with a cross cable, but i need something that can deliver 3Gbps+.

    The storage system is going to have Linux, but on the other one I haven't decided yet. It can be Linux or VMware ESXi, so the link has to be something that i can install drivers for in each system.

    Any ideas?

  2. Thanks, must have forgotten.

    I think switch is faster then if:

    if (k == 0) c = '-';
    if (k == 1) c = '\\';
    if (k == 2) c = '|';
    if (k == 3) c = '/';
    
    

    switch (k) {
    default:
    case 0:
            c = '-';
            break;
    case 1:
            c = '/';
            break;
    case 2:
            c = '|';
            break;
    case 3:
            c = '\\';
            break;
    }
    
    
    

  3. Today i was not feeling like working with anything particular, so i decided to work on a little emulation of progress bar in ANSI C for a console app.

    Was wondering if there is anything that can be optimized in the code below?

    #include <stdio.h>
    #ifdef __MINGW32__
    #include <windows.h>
    #else
    #define Sleep(t)	usleep((t) * 1000)
    #endif
    
    int main(int argc, char **argv) {
    	if (argc < 3) return 1;
    
    	int len = atoi(argv[1]);
    	int step = atoi(argv[2]);
    	int i;
    	char buf[len+1];
    	char c = '-';
    
    	float fstep = (float)len / (float)step;
    
    	for (i = 0; i < len; i++) {
    		buf[i] = '-';
    		buf[i+1] = '\0';
    	}
    
    	printf("[%s] %c %02.0f\%\r", buf, c, 0.0);
    	fflush(stdout);
    
    	for (i = 1; i <= step; i++) {
    		Sleep(3);
    
    		int j, l;
    		for (j = 0; j < len; j++) {
    			if (j < i*(fstep)) {
    				buf[j] = '#';
    				l = j;
    			} else {
    				buf[j] = '-';
    			}
    			buf[j+1] = '\0';
    		}
    
    		if (i != step) buf[l] = '>';
    
    		int k = i%4;
    		if (k == 0) c = '-';
    		if (k == 1) c = '\\';
    		if (k == 2) c = '|';
    		if (k == 3) c = '/';
    
    		float per = i/(float)step*100;
    		printf ("[%-*s] %c %02.0f%% \r", len, buf, c, per);
    		fflush(stdout);
    	}
    
    	printf("\r\n");
    	return 0;
    }
    
    

    Should be able to compile with GCC as well as mingw32.

    Attached are the screenshots of the application running on lenny and xp.

    post-10231-0-06380600-1302101194_thumb.p

    post-10231-0-07278700-1302101200_thumb.p

  4. I want to convert a SSH SOCKS proxy into a HTTP proxy.

    I can get an SOCKS proxy up by -D for ssh.

    But is there a way to convert it into a HTTP proxy (on client side). I could setup a HTTP proxy on the server, and port forward it, but i don't have install rights on the server, and some of the apps i use don't support SOCKS proxy.

    Any ideas...

  5. Does the user have access to CMD.exe. Have you tried to SFTP to the server. Have you tried with a local user or a virtual user in WinSSHd.

    I am running WinSSHd on Windows 2003 Standard (without DC), don't have any problems.

  6. I am going to deploy a machine with several Virtual Machines. But i need some sort of file share server in order to have all the files centrelized. I cannot afford more then what i have hands on, which is an old computer. I have been looking at some alternatives.

    - Samba (So far best resault)

    - SSHFS (unstable for me)

    - NFS

    - FTP

    - WebDAV

    Samba seems to be the winner right now...

  7. What i can see you can do all the stuff in Ubuntu with a little bit of time on hand? I have one tule, never pay for Linux, only for the extra support... As soon as Jaunty comes out (means next weekend) i will switch 2 of three of my machine to Jaunty.

  8. Darren, can yiu compile a list with all the JavaScipt frameworks you will be mailed about.

    As for embedded Linux, i want to have a music player/music server for a low cost. Used to use musicpd, but it uses to much of the cpu, would like to put it up on a dedicated machine... Also control all the lighting (will soon build a gaming rig, which i can turn on on demand via network, using computer driven plugs (a idle PSU [turned off computer] does takes a lot of Wh)).

×
×
  • Create New...