неделя, 17 юли 2011 г.

Free online proxies

Everybody needs a proxy from time to time, whether because you get banned from a site by a stupid bot and you need an admin's attention to remove the ban or simply because you need to see something blocked for your country for totally silly reasons.
So here's some cool sites I discovered these days:
1. Use Google as a proxy (source)! So very simple:
http://www.google.com/translate?langpair=en|en&u=www.forbiddensite.com
Unfortunately, the english to english translation is already removed by Google, but you can always translate to some other language you know. Works for porn, lol.
2. List of free online proxies
Enjoy!

неделя, 19 юни 2011 г.

How to find out the hfloat digits of your computer

Don't ask why I needed it, the point is that at this site, I found out how.
Save this program to some file, say pro.c:
#include <stdio.h>
int main()
{
long double ld = 1.0/3;
double d = 1.0/3;
float f = 1.0/3;

printf("sizeof(float)=%lu\n", sizeof(float));
printf("sizeof(double)=%lu\n", sizeof(double));
printf("sizeof(long double)=%lu\n", sizeof(long double));

printf(" f=%.30lf\n", f);
printf(" d=%.30lf\n", d);
printf("ld=%.30Lf\n", ld);
}

And then compile it:
gcc pro.c -o pro.x
After you compile it, type ./pro.x and count the digits :)
If you're interested into floating point arithmetics in Linux, you can read this site or of course - wikipedia.

вторник, 14 юни 2011 г.

How to suspend trough console

Easy :)
pm-suspend

pm-suspend
# sleep to ram
pm-hibernate
# suspends to hard-disk

Also it appears you can suspend at certain time trough:
at 0100
pm-suspend
<ctrl-D>
And to wake up the computer with:
rtcwake