Skip navigation.

phun

random stuff

The website is down - IT rocks!

Just a link to one of the best videos about IT world I've ever seen: the website is down with subtitles.

Lectures from MIT

Well, that's not a hot news, but still worth mentioning that lectures from MIT are available online in youtube. Have a look at MIT OpenCourseWare to explore the whole repository. One of my favorite ones is Aircraft Systems Engineering, which happens to be about space shuttle. There are even more video lectures available at videolectures.

Windows Vista and 7 in cartoons

, ,

Bad fame of Windows Vista made it even into: Futurama: Into the Wild Green Yonder. There is a hilarious scene when Fry reads minds of different people/robots/aliens in the audience. One of them is Calcuon that seems to be having some problems with the operating system.

As Windows 7 is getting so good reviews, Microsoft seems to take advantage of that and go even further. They're planning to sponsor one of the Family Guy episodes!

foobar & fubar

In the IT world you often come across the foo, bar or foobar-like strings. Those are almost the template names for functions, variables etc. thus you can see it in documentation so often. Almost like the 42- but that's another story. There is even an audio player called foobar2000 - the 2000 makes it even cooler.

But where do those names come from? There is a pretty good explanation in one of the RFCs: RFC 3092 - Etymology of "Foo". While both foo and bar are not very amusing the foobar originates from the II WW with a little different spelling: FUBAR - Fucked Up Beyond All Recognition or Fucked Up Beyond All Repair. The Wiktionary claims that there's alternative meaning: Fucked up but all right (flawed but working nonetheless).

There's also another acronym that comes from military but could be successfully used in the IT world: snafu - situation normal, all fucked up from Wiktionary. But wait we IT guys can also come up with great things! Recently during the Microsoft Technology Summit 2009 I've heard Mark Minasi saying:

It sucks dead donkeys through a garden hose

That's a quote even South Park would envy! In return they can strike back with:

jesus christ monkey balls

which can be found on Urban Dictionary and Google Video.

Functional Specification

Functional specs force you to make the most important decisions when you have the least information


No need to add anything more apart that it comes from a great book that you should read: "Getting Real".

Quine in Python

,

According to wikipedia:

In computing, a quine is a computer program which produces a copy of its own source code as its only output.
...
Quines are named after philosopher Willard Van Orman Quine (1908–2000), who made an extensive study of indirect self-reference. He coined, among others, the following paradox-producing expression, known as Quine's paradox.
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.


Coming up with the simples quine is not hard...

s="s=%s;print s%%`s`";print s%`s`

There is also alternative approach. The output is program's source code, this is not really allowed but loading it's source code works like a charm...

import sys; print "".join(open(sys.argv[0]).readlines())

For some more self-reproducing programs have a look at: link

Remove page from google's results

,

In case you'd like to remove a page from google's search results you should visit the URL removal from Google Webmaster Tools (you need google account). Basically there are two options, if the page is yours then there a few steps to be done, otherwise just provide a basic set of information and wait for the results.

binutils for all your needs

,

Quite recently I needed to build my own cross compiler (arm-elf on cygwin). I've stumbled upon exact thing: link. The attached script does exactly what is required- build the whole tool chain.

As the first step binutils are built. If you like to investigate different binaries types you can build them in a way to support all possible targets. Here's the modified script (build_binutils.sh):

 #!/bin/sh
PREFIX=/tmp/binutils       
PARALLEL="-j 2"
BINUTILS=binutils-2.19.1

export PATH="$PATH:$PREFIX/bin"

mkdir build
wget -c http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.bz2
tar xfvj $BINUTILS.tar.bz2
cd build
../$BINUTILS/configure --enable-targets=all --prefix=$PREFIX \
  --enable-interwork --enable-multilib --with-gnu-as \
  --with-gnu-ld --disable-nls --disable-werror
make $PARALLEL
make install
cd ..
rm -rf build

Of course you'll need working cygwin. Once the script finishes you'll have all the binaries in /tmp/binutils. List of supported targets is impressive:


objcopy: supported targets: pe-i386 a.out.adobe a.out-zero-big a.out-mips-little epoc-pe-arm-big epoc-pe-arm-little epoc-pei-arm-big epoc-pei-arm-little pe-arm-wince-big pe-arm-wince-little pei-arm-wince-big pei-arm-wince-little coff-arm-big coff-arm-little a.out-arm-netbsd pe-arm-big pe-arm-little pei-arm-big pei-arm-little b.out.big b.out.little efi-app-ia32 efi-bsdrv-ia32 efi-rtdrv-ia32 elf32-avr elf32-bfin elf32-bfinfdpic elf32-big elf32-bigarc elf32-bigarm elf32-bigarm-symbian elf32-bigarm-vxworks elf32-bigmips elf32-bigmips-vxworks elf32-cr16 elf32-cr16c elf32-cris elf32-crx elf32-d10v elf32-d30v elf32-dlx elf32-fr30 elf32-frv elf32-frvfdpic elf32-h8300 elf32-hppa-linux elf32-hppa-netbsd elf32-hppa elf32-i370 elf32-i386-freebsd elf32-i386-vxworks elf32-i386 elf32-i860-little elf32-i860 elf32-i960 elf32-ip2k elf32-iq2000 elf32-little elf32-littlearc elf32-littlearm elf32-littlearm-symbian elf32-littlearm-vxworks elf32-littlemips elf32-littlemips-vxworks elf32-m32c elf32-m32r elf32-m32rle elf32-m32r-linux elf32-m32rle-linux elf32-m68hc11 elf32-m68hc12 elf32-m68k elf32-m88k elf32-mcore-big elf32-mcore-little elf32-mep elf32-mn10200 elf32-mn10300 elf32-mt elf32-msp430 elf32-openrisc elf32-or32 elf32-pj elf32-pjl elf32-powerpc elf32-powerpc-vxworks elf32-powerpcle elf32-s390 elf32-bigscore elf32-littlescore elf32-sh elf32-shbig-linux elf32-shl elf32-shl-symbian elf32-sh-linux elf32-shl-nbsd elf32-shl-vxworks elf32-sh-nbsd elf32-sh-vxworks elf32-sparc elf32-sparc-vxworks elf32-spu elf32-tradbigmips elf32-tradlittlemips elf32-us-cris elf32-v850 elf32-vax elf32-xc16x elf32-xstormy16 elf32-xtensa-be elf32-xtensa-le pe-powerpc pei-powerpc pe-powerpcle pei-powerpcle a.out-cris ecoff-bigmips ecoff-biglittlemips ecoff-littlemips coff-go32 coff-go32-exe coff-h8300 coff-h8500 a.out-hp300hpux a.out-i386 a.out-i386-bsd coff-i386 a.out-i386-freebsd a.out-i386-lynx coff-i386-lynx msdos a.out-i386-netbsd i386os9k pei-i386 coff-i860 coff-Intel-big coff-Intel-little ieee coff-m68k coff-m68k-un a.out-m68k-netbsd coff-m68k-sysv coff-m88kbcs a.out-m88k-mach3 a.out-m88k-openbsd mach-o-be mach-o-le mach-o-fat coff-maxq pe-mcore-big pe-mcore-little pei-mcore-big pei-mcore-little pe-mips pei-mips a.out-newsos3 nlm32-i386 nlm32-powerpc nlm32-sparc coff-or32-big a.out-pc532-mach a.out-ns32k-netbsd a.out-pdp11 pef pef-xlib ppcboot aixcoff-rs6000 coff-sh-small coff-sh coff-shl-small coff-shl pe-shl pei-shl coff-sparc a.out-sparc-little a.out-sparc-linux a.out-sparc-lynx coff-sparc-lynx a.out-sparc-netbsd a.out-sunos-big sym a.out-tic30 coff-tic30 coff0-beh-c54x coff0-c54x coff1-beh-c54x coff1-c54x coff2-beh-c54x coff2-c54x coff-tic80 a.out-vax-bsd a.out-vax-netbsd a.out-vax1k-netbsd versados vms-vax coff-w65 coff-we32k coff-z80 coff-z8k elf32-am33lin srec symbolsrec tekhex binary ihex

Show me the wattage

, , ,

When your lenovo laptop is running on batteries and you happen to use the power gage and the wattage
indication is missing you can still bring it back with a little registry tweaking:

[HKEY_CURRENT_USER\Software\IBM\PWRMGR\Data]
"ShowRemainingTimeGauge"=dword:00000002

0 is to display "remaining percentage"
1 is to display "time remaining"
2 is to display "wattage"

Original source of information: forum.thinkpads.com

Protect your bike

December 2009
M T W T F S S
November 2009January 2010
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31