Fedora 12 Nvidia Driver Installation
Add this to the end of kernel directive in /etc/grub.conf:
nouveau.modeset=0 vga=0×318
Next, install additional repo rpms:
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
Follow this by:
yum --enablerepo=rp*g install kmod-nvidia.$(uname -m) xorg-x11-drv-nvidia-libs.i686 xorg-x11-drv-nvidia-libs.x86_64
Set SElinux allow_execstack on if you use SElinux:
setsebool -P allow_execstack on
Finally:
reboot
…and enjoy.
Great Photo of Space Shuttle Atlantis ‘Business End’
There is something awesome about this Image of the Day from NASA. Not only is it depicting the most complicated and technologically advanced machine ever build by modern humans but it does it in such a way that for someone who doesn’t know what a space shuttle is this may look like a bunch of blocks and tubes, sort of like an abandoned old coal power station.
This is no scifi movie studio prop, this it the real deal in Space!

This view of the aft portion of the space shuttle Atlantis, including the three main engines, was provided by the Expedition 21 crew during a survey of the approaching vehicle prior to docking with the International Space Station. As part of the survey and every mission’s activities, Atlantis performed a back-flip for the rendezvous pitch maneuver. The image was photographed with a digital still camera, using a 400mm lens at a distance of about 600 feet (180 meters).
Image Credit: NASA
Fedora 12 Constantine x86_64 Flash Player Installation
There’s a good chance if you did a clean installation of 64 bit Fedora 12 Constantine that any Flash web content won’t flash – pun intended.
A quick workaround for this is to download the latest 64 bit Flash Player for Linux:
http://labs.adobe.com/downloads/flashplayer10_64bit.html
Extract it:
tar -zxvf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz -C /usr/lib64/mozilla/plugins
Restart Firefox, and confirm plugin installation by typing this into the address bar (look for “Shockwave Flash” section):
about:plugins
Enjoy Flashy web content.
Delayed Screenshot in Gnome
If you need to take a delayed screenshot of your desktop in Gnome then one of the easiest ways is to open a terminal, go to a directory where you want your screenshot to be saved, and run this command:
gnome-panel-screenshot --delay 10
–delay 10 – will delay the screengrab by 10 seconds, so you can have plenty of time to prepare whatever you need to take a screenshot of.
100 Interesting Science Facts
1/ The speed of light is generally rounded down to 186,000 miles per second. In exact terms it is 299,792,458 m/s (metres per second – that is equal to 186,287.49 miles per second).
2/ It takes 8 minutes 17 seconds for light to travel from the Sun’s surface to the Earth.
3/ October 12th, 1999 was declared “The Day of Six Billion” based on United Nations projections.
4/ 10 percent of all human beings ever born are alive at this very moment.
5/ The Earth spins at 1,000 mph but it travels through space at an incredible 67,000 mph.
6/ Every year over one million earthquakes shake the Earth.
7/ When Krakatoa erupted in 1883, its force was so great it could be heard 4,800 kilometres away in Australia.
8/ The largest ever hailstone weighed over 1kg and fell in Bangladesh in 1986.
9/ Every second around 100 lightning bolts strike the Earth.
10/ Every year lightning kills 1000 people.
11/ In October 1999 an Iceberg the size of London broke free from the Antarctic ice shelf .
12/ If you could drive your car straight up you would arrive in space in just over an hour.
13/ Human tapeworms can grow up to 22.9m.
14/ The Earth is 4.56 billion years old…the same age as the Moon and the Sun.
15/ The dinosaurs became extinct before the Rockies or the Alps were formed.
16/ Female black widow spiders eat their males after mating.
17/ When a flea jumps, the rate of acceleration is 20 times that of the space shuttle during launch.
18/ ——-
19/ If our Sun were just inch in diameter, the nearest star would be 445 miles away.
20/ The Australian billygoat plum contains 100 times more vitamin C than an orange.
21/ Astronauts cannot belch – there is no gravity to separate liquid from gas in their stomachs.
22/ The air at the summit of Mount Everest, 29,029 feet is only a third as thick as the air at sea level.
23/ One million, million, million, million, millionth of a second after the Big Bang the Universe was the size of a …pea.
24/ DNA was first discovered in 1869 by Swiss Friedrich Mieschler.
25/ The molecular structure of DNA was first determined by Watson and Crick in 1953.
26/ The first synthetic human chromosome was constructed by US scientists in 1997.
27/ The thermometer was invented in 1607 by Galileo.
28/ Englishman Roger Bacon invented the magnifying glass in 1250.
29/ Alfred Nobel invented dynamite in 1866.
30/ Wilhelm Rontgen won the first Nobel Prize for physics for discovering X-rays in 1895.
31/ The tallest tree ever was an Australian eucalyptus – In 1872 it was measured at 435 feet tall.
32/ Christian Barnard performed the first heart transplant in 1967 – the patient lived for 18 days.
33/ The wingspan of a Boeing 747 is longer than the Wright brother’s first flight.
34/ An electric eel can produce a shock of up to 650 volts.
35/ ‘Wireless’ communications took a giant leap forward in 1962 with the launch of Telstar, the first satellite capable of relaying telephone and satellite TV signals.
36/ The earliest wine makers lived in Egypt around 2300 BC.
37/ The Ebola virus kills 4 out of every 5 humans it infects.
38/ In 5 billion years the Sun will run out of fuel and turn into a Red Giant.
39/ Giraffes often sleep for only 20 minutes in any 24 hours. They may sleep up to 2 hours (in spurts – not all at once), but this is rare. They never lie down.
40/ A pig’s orgasm lasts for 30 minutes.
41/ Without its lining of mucus your stomach would digest itself.
42/ Humans have 46 chromosomes, peas have 14 and crayfish have 200.
43/ There are 60,000 miles of blood vessels in the human body.
44/ An individual blood cell takes about 60 seconds to make a complete circuit of the body.
45/ Utopia ia a large, smooth lying area of Mars.
46/ On the day that Alexander Graham Bell was buried the entire US telephone system was shut down for 1 minute in tribute.
47/ The low frequency call of the humpback whale is the loudest noise made by a living creature.
48/ The call of the humpback whale is louder than Concorde and can be heard from 500 miles away.
49/ A quarter of the world’s plants are threatened with extinction by the year 2010.
50/ Each person sheds 40lbs of skin in his or her lifetime.
51/ At 15 inches the eyes of giant squids are the largest on the planet.
52/ The largest galexies contain a million, million stars.
53/ The Universe contains over 100 billion galaxies.
54/ Wounds infested with maggots heal quickly and without spread of gangrene or other infection.
55/ More germs are transferred shaking hands than kissing.
56/ The longest glacier in Antarctica, the Almbert glacier, is 250 miles long and 40 miles wide.
57/ The fastest speed a falling raindrop can hit you is 18mph.
58/ A healthy person has 6,000 million, million, million haemoglobin molecules.
59/ A salmon-rich, low cholesterol diet means that Inuits rarely suffer from heart disease.
60/ Inbreeding causes 3 out of every 10 Dalmation dogs to suffer from hearing disability.
61/ The world’s smallest winged insect, the Tanzanian parasitic wasp, is smaller than the eye of a housefly.
62/ If the Sun were the size of a beach ball then Jupiter would be the size of a golf ball and the Earth would be as small as a pea.
63/ It would take over an hour for a heavy object to sink 6.7 miles down to the deepest part of the ocean.
64/ There are more living organisms on the skin of each human than there are humans on the surface of the earth.
65/ The grey whale migrates 12,500 miles from the Artic to Mexico and back every year.
66/ Each rubber molecule is made of 65,000 individual atoms.
67/ Around a million, billion neutrinos from the Sun will pass through your body while you read this sentence.
68/…and now they are already past the Moon.
69/ Quasars emit more energy than 100 giant galaxies.
70/ Quasars are the most distant objects in the Universe.
71/ The saturn V rocket which carried man to the Moon develops power equivalent to fifty 747 jumbo jets.
72/ Koalas sleep an average of 22 hours a day, two hours more than the sloth.
73/ Light would take .13 seconds to travel around the Earth.
74/ Males produce one thousand sperm cells each second – 86 million each day.
75/ Neutron stars are so dense that a teaspoonful would weigh more than all the people on Earth.
76/ One in every 2000 babies is born with a tooth.
77/ Every hour the Universe expands by a billion miles in all directions.
78/ Somewhere in the flicker of a badly tuned TV set is the background radiation from the Big Bang.
79/ Even travelling at the speed of light it would take 2 million years to reach the nearest large galaxy, Andromeda.
80/ The temperature in Antarctica plummets as low as -35 degrees celsius.
81/ At over 2000 kilometres long The Great Barrier Reef is the largest living structure on Earth.
82/ A thimbleful of a neutron star would weigh over 100 million tons.
83/ The risk of being struck by a falling meteorite for a human is one occurence every 9,300 years.
84/ The driest inhabited place in the world is Aswan, Egypt where the annual average rainfall is .02 inches.
85/ The deepest part of any ocean in the world is the Mariana trench in the Pacific with a depth of 35,797 feet.
86/ The largest meteorite craters in the world are in Sudbury, Ontario, canada and in Vredefort, South Africa.
87/ The largest desert in the world, the Sahara, is 3,500,000 square miles.
88/ The largest dinosaur ever discovered was Seismosaurus who was over 100 feet long and weighed up to 80 tonnes.
89/ The African Elephant gestates for 22 months.
90/ The short-nosed Bandicoot has a gestation period of only 12 days.
91/ The mortality rate if bitten by a Black Mamba snake is over 95%.
92/ In the 14th century the Black Death killed 75,000,000 people. It was carried by fleas on the black rat.
93/ A dog’s sense of smell is 1,000 times more sensitive than a humans.
94/ A typical hurricane produces the nergy equivalent to 8,000 one megaton bombs.
95/ 90% of those who die from hurricanes die from drowning.
96/ To escape the Earth’s gravity a rocket need to travel at 7 miles a second.
97/ If every star in the Milky Way was a grain of salt they would fill an Olympic sized swimming pool.
98/ Microbial life can survive on the cooling rods of a nuclear reactor.
99/ Micro-organisms have been brought back to life after being frozen in perma-frost for three million years.
100/ Our oldest radio broadcasts of the 1930s have already travelled past 100,000 stars.
Original source: http://zarius.com/archives/2006/04/20/100-interesting-science-facts/
RedHat – dynamically add a new VM disk to a running OS without a reboot.
MOAR SPACE!!!!1@ NO REBOOTS!!!#!
Okay boss.
After creating a new disk image in VMWare for this particular machine, it won’t be discovered until the system is rebooted. But there is a way to have the system discover the newly created drive without rebooting and disturbing any potential service availability. Isn’t that cool?
Let’s verify that the disk is in fact not being seen yet:
[root@server ~]# fdisk -l Disk /dev/sda: 13.9 GB, 13958643712 bytes 255 heads, 63 sectors/track, 1697 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 268 2048287+ 82 Linux swap / Solaris /dev/sda3 269 1697 11478442+ 83 Linux Disk /dev/sdb: 161.0 GB, 161061273600 bytes 255 heads, 63 sectors/track, 19581 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 19581 157284351 83 Linux
Verify the number of SCSI devices reported by the controller:
[root@server ~]# ls /sys/class/scsi_disk/ 0:0:0:0 0:0:1:0
Where:
0:0:0:0 – 13.9 GB
0:0:1:0 – 161 GB
This is where the magic happens. If you want to have a look at what is happening behind the scenes, open another terminal session and tail the log:
tail -f /var/log/messages
Now the major player, the ‘- – -’ are wildcards indicating that the controller should scan everything it can scan:
echo - - - > /sys/class/scsi_host/host0/scan
At this point the ‘messages’ should log the following lines:
Nov 12 11:25:59 server kernel: Vendor: VMware Model: Virtual disk Rev: 1.0 Nov 12 11:25:59 server kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 12 11:25:59 server kernel: target0:0:2: Beginning Domain Validation Nov 12 11:25:59 server kernel: target0:0:2: Domain Validation skipping write tests Nov 12 11:25:59 server kernel: target0:0:2: Ending Domain Validation Nov 12 11:25:59 server kernel: target0:0:2: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127) Nov 12 11:25:59 server kernel: SCSI device sdc: 587202560 512-byte hdwr sectors (300648 MB) Nov 12 11:25:59 server kernel: sdc: test WP failed, assume Write Enabled Nov 12 11:25:59 server kernel: sdc: cache data unavailable Nov 12 11:25:59 server kernel: sdc: assuming drive cache: write through Nov 12 11:25:59 server kernel: SCSI device sdc: 587202560 512-byte hdwr sectors (300648 MB) Nov 12 11:25:59 server kernel: sdc: test WP failed, assume Write Enabled Nov 12 11:25:59 server kernel: sdc: cache data unavailable Nov 12 11:25:59 server kernel: sdc: assuming drive cache: write through Nov 12 11:25:59 server kernel: sdc: unknown partition table Nov 12 11:25:59 server kernel: sd 0:0:2:0: Attached scsi disk sdc Nov 12 11:25:59 server kernel: sd 0:0:2:0: Attached scsi generic sg2 type 0
Let’s verify:
[root@server ~]# ls /sys/class/scsi_disk/ 0:0:0:0 0:0:1:0 0:0:2:0
[root@server ~]# fdisk -l Disk /dev/sda: 13.9 GB, 13958643712 bytes 255 heads, 63 sectors/track, 1697 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 268 2048287+ 82 Linux swap / Solaris /dev/sda3 269 1697 11478442+ 83 Linux Disk /dev/sdb: 161.0 GB, 161061273600 bytes 255 heads, 63 sectors/track, 19581 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 19581 157284351 83 Linux Disk /dev/sdc: 300.6 GB, 300647710720 bytes 255 heads, 63 sectors/track, 36551 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table
All seems good. Now it’s time to partition it, create a desired file system, mount, copy data, remount, all without anyone even noticing or suspecting anything. The only indication of any actions performed on the server will be a crap load of more disk space.
Disable the F@#$%n System Bell
Really? Is there really any valid reason to have the system bell beep every time a backspace or tab is hit more then once at the end of the line? Especially when the OS already has it own sound theme going on, and how much more validation does one need to know there isn’t any more characters left to backspace or nothing is showing to a tab completion then actually nothing happening at the cursor?
Get rid of that pest once for all by:
1. Disable it in /etc/inputrc by uncommenting this line:
set bell-style none
2. Blacklist it!
rmmod pcspkr echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist.conf
3. Suggestion from a reader (thanks Troy):
echo "install pcspkr :" >> /etc/modprobe.conf
4. Rip that bastard straight off of the motherboard.
Why isn’t this an option to disable it in Gnome Sound Settings anymore?
Evolution of a Programmer
*High School/Jr.High
10 PRINT "HELLO WORLD"
20 END
*First year in College
program Hello(input, output)
begin
writeln('Hello World')
end.
*Senior year in College
(defun hello
(print
(cons 'Hello (list 'World))))
*New professional
#include
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i
#include
class string
{
private:
int size;
char *ptr;
string() : size(0), ptr(new char[1]) { ptr[0] = 0; }
string(const string &s) : size(s.size)
{
ptr = new char[size + 1];
strcpy(ptr, s.ptr);
}
~string()
{
delete [] ptr;
}
friend ostream &operator <<(ostream &, const string &); string &operator=(const char *); }; ostream &operator<<(ostream &stream, const string &s) { return(stream <);
importheader();
importheader();
importheader("pshlo.h");
importheader("shlo.hxx");
importheader("mycls.hxx");
// needed typelibs
importlib("actimp.tlb");
importlib("actexp.tlb");
importlib("thlo.tlb");
[
uuid(2573F891-CFEE-101A-9A9F-00AA00342820),
aggregatable
]
coclass CHello
{
cotype THello;
};
};
#include "ipfix.hxx"
extern HANDLE hEvent;
class CHello : public CHelloBase
{
public:
IPFIX(CLSID_CHello);
CHello(IUnknown *pUnk);
~CHello();
HRESULT __stdcall PrintSz(LPWSTR pwszString);
private:
static int cObjRef;
};
#include
#include
#include
#include
#include "thlo.h"
#include "pshlo.h"
#include "shlo.hxx"
#include "mycls.hxx"
int CHello::cObjRef = 0;
CHello::CHello(IUnknown *pUnk) : CHelloBase(pUnk)
{
cObjRef++;
return;
}
HRESULT __stdcall CHello::PrintSz(LPWSTR pwszString)
{
printf("%ws
", pwszString);
return(ResultFromScode(S_OK));
}
CHello::~CHello(void)
{
// when the object count goes to zero, stop the server
cObjRef--;
if( cObjRef == 0 )
PulseEvent(hEvent);
return;
}
#include
#include
#include "pshlo.h"
#include "shlo.hxx"
#include "mycls.hxx"
HANDLE hEvent;
int _cdecl main(
int argc,
char * argv[]
) {
ULONG ulRef;
DWORD dwRegistration;
CHelloCF *pCF = new CHelloCF();
hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
// Initialize the OLE libraries
CoInitializeEx(NULL, COINIT_MULTITHREADED);
CoRegisterClassObject(CLSID_CHello, pCF, CLSCTX_LOCAL_SERVER,
REGCLS_MULTIPLEUSE, &dwRegistration);
// wait on an event to stop
WaitForSingleObject(hEvent, INFINITE);
// revoke and release the class object
CoRevokeClassObject(dwRegistration);
ulRef = pCF->Release();
// Tell OLE we are going away.
CoUninitialize();
return(0); }
extern CLSID CLSID_CHello;
extern UUID LIBID_CHelloLib;
CLSID CLSID_CHello = { /* 2573F891-CFEE-101A-9A9F-00AA00342820 */
0x2573F891,
0xCFEE,
0x101A,
{ 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
};
UUID LIBID_CHelloLib = { /* 2573F890-CFEE-101A-9A9F-00AA00342820 */
0x2573F890,
0xCFEE,
0x101A,
{ 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
};
#include
#include
#include
#include
#include
#include "pshlo.h"
#include "shlo.hxx"
#include "clsid.h"
int _cdecl main(
int argc,
char * argv[]
) {
HRESULT hRslt;
IHello *pHello;
ULONG ulCnt;
IMoniker * pmk;
WCHAR wcsT[_MAX_PATH];
WCHAR wcsPath[2 * _MAX_PATH];
// get object path
wcsPath[0] = '';
wcsT[0] = '';
if( argc > 1) {
mbstowcs(wcsPath, argv[1], strlen(argv[1]) + 1);
wcsupr(wcsPath);
}
else {
fprintf(stderr, "Object path must be specified\n");
return(1);
}
// get print string
if(argc > 2)
mbstowcs(wcsT, argv[2], strlen(argv[2]) + 1);
else
wcscpy(wcsT, L"Hello World");
printf("Linking to object %ws\n", wcsPath);
printf("Text String %ws\n", wcsT);
// Initialize the OLE libraries
hRslt = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if(SUCCEEDED(hRslt)) {
hRslt = CreateFileMoniker(wcsPath, &pmk);
if(SUCCEEDED(hRslt))
hRslt = BindMoniker(pmk, 0, IID_IHello, (void **)&pHello);
if(SUCCEEDED(hRslt)) {
// print a string out
pHello->PrintSz(wcsT);
Sleep(2000);
ulCnt = pHello->Release();
}
else
printf("Failure to connect, status: %lx", hRslt);
// Tell OLE we are going away.
CoUninitialize();
}
return(0);
}
*Apprentice Hacker
#!/usr/local/bin/perl
$msg="Hello, world.\n";
if ($#ARGV >= 0) {
while(defined($arg=shift(@ARGV))) {
$outfilename = $arg;
open(FILE, ">" . $outfilename) || die "Can't write $arg: $!\n";
print (FILE $msg);
close(FILE) || die "Can't close $arg: $!\n";
}
} else {
print ($msg);
}
1;
*Experienced Hacker
#include
#define S "Hello, World\n"
main(){exit(printf(S) == strlen(S) ? 0 : 1);}
*Seasoned Hacker
% cc -o a.out ~/src/misc/hw/hw.c
% a.out
*Guru Hacker
% echo "Hello, world."
*New Manager
10 PRINT "HELLO WORLD"
20 END
*Middle Manager
mail -s "Hello, world." bob@b12
Bob, could you please write me a program that prints "Hello, world."?
I need it by tomorrow.
^D
*Senior Manager
% zmail jim
I need a "Hello, world." program by this afternoon.
*Chief Executive
% letter
letter: Command not found.
% mail
To: ^X ^F ^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized
% logout
Credit: ariel.com.au
