Thursday, December 31, 2009

Hot to unlock Keyring Manager in Ubuntu

1.Go to Applications, Accessories, Passwords and Encryption Keys
2.In the "Passwords" tab, find "passwords:login", right click to select "Unlock"
3.After input the password to unlock it, then right click the "passwords:login", select "Change Password"
4.Type in old password, leave "Password" and "Confirm password' to empty, then click button "change" and when window "Store passwords unencrypted?" is displayed then choose "Use Unsafe Storage"
5. Make fun :)

Tuesday, December 22, 2009

Ceny mieszkań w Polsce

Średnie ceny mieszkań (1 m2)
na rynku wtórnym w największych miastach

miasto

10'09

(PLN)

11'09

(PLN)

zmiana mdm

(%)

zmiana mdm

(PLN)

zmiana rdr

(%)

Białystok

4 605

4 575

-0,7

-30

-3,7

Bydgoszcz

4 206

4 188

-0,4

-18

-3,2

Gdańsk

6 404

6 369

-0,5

-35

-9,2

Gdynia

6 568

6 636

1,0

68

-7,4

Gorzów W.

3 140

bd

bd

bd

bd

Katowice

4 200

4 190

-0,2

-10

1,0

Kielce

4 190

bd

bd

bd

bd

Kraków

7 397

7 444

0,6

47

-2,1

Lublin

5 033

4 981

-1,0

-52

-3,0

Łódź

4 257

4 339

1,9

82

-4,8

Olsztyn

4 736

4 823

1,8

87

-3,6

Opole

4 104

4 095

-0,2

-9

1,8

Poznań

5 778

5 866

1,5

88

0,2

Rzeszów

4 542

4 690

3,3

148

0,9

Sopot

10 391

10 006

-3,7

-385

-9,5

Szczecin

4 888

4 817

-1,5

-71

-6,8

Warszawa

8 971

9 033

0,7

62

-4,3

Wrocław

6 771

6 887

1,7

116

-2,4


Średnie ceny ofertowe obliczone na podstawie cen mieszkań wystawionych do sprzedaży w listopadzie 2009 r.

Źródło: oferty.net

Saturday, December 19, 2009

Well, well, well... Maemo in Nokia:)

During reading the Newsweek magazine I came across the article about news connected with technology. I was wondered (and really happy) when I saw the Nokia N9000 phone. Why? Because the mobile runs on Linux Maemo 5.
At first take a look at Nokia's comment about this phone:
"The Nokia N900 packs a powerful ARM Cortex-A8 processor, up to 1GB of application memory and OpenGL ES 2.0 graphics acceleration. The result is PC-like multitasking, allowing many applications to run simultaneously. Switching between applications is simple, as all running content is constantly available through the dashboard. The panoramic homescreen can be fully personalized with favorite shortcuts, widgets and applications. The Nokia N900 has 32GB of storage, which is expandable up to 48GB via a microSD card. For photography, the Maemo software and the N900 come with a new tag cloud user interface that will help users get the most out of the 5MP camera and Carl Zeiss optics." So it seems to be great.


And last but not least: Maemo. Maemo is a software platform that is mostly based on open source code and powers mobile devices. This platform has been developed by Nokia in collaboration with many open source projects such as the Linux kernel, Debian and GNOME.


The result of this combination you can see below.

Saturday, December 5, 2009

Friday's reflection about music...

Friday. About 11:29 PM. Only me and glass of wine. This time makes me very open for new ideas, states and ...music styles. Tonight I'd like to present my newest music invention. As far as I can remember I've been loving rock music. Other music styles were for me....how to say it...no mine. They don't tell me anything. I can listen to them but I can't understand at all. To be honest I have to say 'I couldn't', because since I heard songs of a really great artist - Jacek Ścibor - my mind has been changed. The artist I mentioned before I came across thanks to my postgraduate studies on University of Rzeszów. At the beginning he used to be for me very strange due to his outfit and exercises we had to do. But through the time I spent with him I have completely changed my mind. He's very talented man with great vocal. Anyway please listen to his music and check it by yourself :)

Link

Tuesday, December 1, 2009

10 Free Alternatives of Microsoft Office Word!

Over the years, Microsoft Office Word has been the best and most advanced Word processing application. However, the cost of Microsoft word can be extremely high and the small businesses may feel it as a burden. So, I’m listing the free alternatives of Microsoft Word, so that you may use it for your business or for your personal use :-

Offline Alternatives of Microsoft Office Word :

ooowriter 1. OpenOffice.org Writer : This open source software package is an overall alternative to Microsoft Office. OOo Writer is perfect replacement of Microsoft word. Bruce Byfield has done an extensive comparison between the two programs and I’m sure you’ll see that OOo Writer is no less than MS Word.

abiword 2. AbiWord : AbiWord is similar to MS Word and MS Word users will not find much problem in switching over to this free application and will certainly love it as there is nothing better than a powerful and free word processor.

3. QJot : This particular software is not as powerful as OOo Writer and AbiWord but it’s a light weight replacement of MS word. It allows you to edit the DOC files and that’s what puts it in the list of the alternatives.

4. Jarte : Jarte is another replacement of MS Word but only because it lets you edit the word files. It’s very strange looking and I would say that you won’t like this one at all, it’s user interface is one of the worst ones I’ve ever seen.

I’ll say that only OOo Writer and AbiWord are the real alternatives to MS Word and because both of those software are available for Linux and Windows alike, so you’ll find them as the perfect solution and alternative to MS Word.

Online Alternatives of Microsoft Word (everyone of them is in beta):

zoho1. Zoho Writer : The perfect alternative of MS Word when you talk about online word processor. It doesn’t have the features of complete MS Word but it gives you more than what a desktop based word processor can’t give you and that will be Collaboration with other users. It’s still in beta so you can expect some serious features in short time.

thinkfree 2. ThinkFree Writer : ThinkFree offers both online and offline versions but it’s the online one which is free. It is also a powerful online word processor and is no less than Zoho writer. It also offers collaboration and that’s what puts it at par with desktop based word processors. Again like Zoho writer, its short of features as compared to desktop based word processors but I think that most of you will do without those features.

google 3. Google Docs : This offering from Google isn’t the best at this point of time but you can’t say anything when we are talking about Google. They are the number 1 brand and everyone know why, because they are known for building great web applications. Don’t forget to check this one out.

Well, I use Zoho, Google docs and ThinkFree the most. So I’ve written what I personally feel about them. However, there are many other online MS Word processor. So, I’m just listing them with the description given by their creators.

ajaxwrite 4. Ajax Write : ajaxWrite is a web-based word processor that can read and write Microsoft Word and other standard document formats. Anytime you need to open, read or write a word processor file, simply point your FireFox browser to www.ajaxwrite.com and in seconds a full-featured program will be available for you to open, edit, print and save.

buzzword 5. Buzzword : I’d recommend you give it a good try as soon as it is available, there really isn’t a learning curve if you are using word processing apps already. I’m looking forward to seeing how Buzzword develops. If they nail those integration tasks then it will definitely become part of my bookmarks toolbar for creating and editing documents for myself or to share with colleagues. Review & opinion by Richard.

goffice 6. gOffice : No it’s not by Google but by SilverOffice Inc. Here’s what manino has to say about this MS Word alternative – ” gOffice has word processing, DTP, presentations and spreadsheets. Of course, all of them have to be very simple, which is good for 80% of the population – the rest can very well shell out $500 for their own indesign or whatever.”

Source: http://www.reviewsaurus.com/online-office/offline-online-microsoft-word-alternatives

4 ways of converting the docx format to doc format!

With the release of Microsoft Office 2007 came a new format DOCX. Yes, all the word documents created in Microsoft Word 2007 will be saved in DOCX format until and unless you specifically save them in DOC format using the SAVE AS format.

There are few ways through which you can convert the DOCX files into DOC format, so that they can be opened using older version of Microsoft Office or may be with OpenOffice.Org :

1. Convert the file using ZamZar : You can simply go on ZamZar.com & then upload the DOCX file and then select the option of exporting it to DOC format.

2. Convert using DOCX2DOC : Another online converter and this one is specifically for converting the files from DOCX to DOC. Visit DOCX2DOC.COM

3. Compatibility pack by Microsoft : You may download the compatibility pack from Microsoft which will allow you to open, edit and save the DOCX format in the older version of MS Office.

4. Convert using the OpenOffice.org : You can also open the DOCX file in OpenOffice.org but that too with the help of the converter. You’ll need to download this extension and then only you’ll be able to convert the file. Found via thedailyblahblah blog.

So, these are the ways through which you can easily convert the DOCX documents into DOC format.

Source: http://www.reviewsaurus.com/blogging-tips/convert-open-read-docx-to-doc

Saturday, November 28, 2009

How to convert files from so-called "mobile formats" to normal PC files?

Use the mmc from this localtion. :)

Google real cams :)

You probably don't know that you are able to control some internet cams by using your local computer. Simply find cam to control by entering inurl:/view/index.shtml and make fun :)

Console synaptic without entering root's password

1. Open sudoers editor
sudo visudo
2. Add the followin text (where username is your login name of course)
username ALL=(ALL) ALL, NOPASSWD: /usr/sbin/synaptic
3. Try to open synaptic by using console
sudo synaptic
4. As usual make fun :)

The website is down...

I would like to work as an admin. Why? Simply look at this :)

Disclaimer: The movie contains harsh language!

Saturday, November 21, 2009

Bluetooth marketing

Bluetooth marketing is the name of the service which improving promoting and advertising of products, services or even a company by using bluetooth technologies. It simply menas that you will get some text, promotion materials or prospects on your mobile or handheld device when you are in the appropriate distance from bluetooth server and you have got your bluetooth device turned on of course.
A special kind of software is developped for bluetooth marketing - they are called bluetooth advertising software.
Example of bluetooth advertising software is under this link.

Wednesday, November 18, 2009

Full moon - lyrics

Far away in esian
puts itself in deeper space
we slip almost unknowing
into a deeper darker place
inside my dreams
they build business machines
nothing here is ever what it seems
in the land of haven't got a clue
i'm not to blame
for anything i do
in the land of couldn't give a fuck
you pay your money
and leave the rest to walk

the man in the moon
is watching you
and me
and everything we do
life on mars
a stairway to the stars
cheap flights
fast food
flash cars
worlds collide
states divide
choose your site
land slides
a 3rd walk from the sun
it's only just begun
for you
and me
and everyone

i push my head into a deep blue pillow sound
music ? with time
ressonnates around
comic trails like horses tales
riding in this night
beyond the coming morning
beyond the coming lights
all around us
a great big ? of wonder
the earth we walk
the sky we're under
these moments of mine
they belong to to me
i bathe in lunar waters
sea of tranquility

the man in the moon
...

the scorch to this catch is fine
it find's no relief
can we find it in ourselves
ever to conceive
a cities choke
and islands disappear in smoke
but may be what we're doing
in some way could provoke
altough the forms are shifting
as nature makes it's way
the speed of change we're forcing
tears our souls away
the moon is full
the river's high
what will become
of you and i?

the man in the moon
...

Monday, November 16, 2009

Sounds of Castle Party...

If I asked you "Have you ever seen a real vampire?" you would probably say "No". But what would you say if I asked you "Would you like to meet a vampire?" If your answer was "yes" I would like to invite you to the Castle Party.

The Castle Party is a large-scale annual music event which is one of the biggest European music festival. It gathers thousands so-called 'goths' - fans of a industrial music pervaded with gloomy lyrics - whose ghoulish appearance makes 'normal people' scared. It takes place on a huge medieval castle in Bolkow - a city in south-east part of Poland.

People who take part in the event can meet and listen to their favourite artists, and make friends as well. Everyone is able to dress up and feel like somebody else. So you can come across for example a vampire or a witch and nobody of them raises a laugh.

The atmosphere of this festival is unique: dark characters and ghostly music are in contrast to having fun and meeting friends. So if you like a 'goth' music you are invited...






Wednesday, November 11, 2009

The longest English word is...

...Lopado­temacho­selacho­galeo­kranio­leipsano­drim­hypo­trimmato­silphio­parao­melito­katakechy­meno­kichl­epi­kossypho­phatto­perister­alektryon­opte­kephallio­kigklo­peleio­lagoio­siraio­baphe­tragano­pterygon :)

How to convert online book into mp3?

Sometimes when I find online book which I want to read I don't have much time to do it. It's caused by a lot of different things I have to do in the same time. After thinking I've revealed some method to make getting knowledge from this book possible without reading it - if you can't read a book, listen it!!!
It is not as hard as you could thing. See below for script gives you possibility to do it.

#!/bin/bash

rm ch*

for i in `seq 0 13`;
do

if [ $i -lt 10 ]
then
chapter='0'$i
else
chapter=$i
fi

chapter="ch"$chapter".html"
wget "http://stallman.helion.pl/"$chapter

html2text $chapter >> out.txt
done
espeak -v pl -f out.txt -w plik.wav
lame -V2 plik.wav plik.mp3

Tuesday, November 10, 2009

Ubuntu polish-cheatsheet

A few words about basic configuration of Ubuntu -->link<--.

How to set GMain as default mail client undex Linux

It's very simple. Just follow instruction posted under this link.

Friday, November 6, 2009

Polish characters in LaTeX

1. Install packages

texlive-fonts-extra - TeX Live: Extra fonts
texlive-lang-polish - TeX Live: Polish

waldekd@waldekd-laptop:~/Documents/Latex$ sudo aptitude install texlive-fonts-extra
waldekd@waldekd-laptop:~/Documents/Latex$ sudo aptitude install texlive-lang-polish

2. Test it by using the following article template

% File: text.tex
% Created: Fri Nov 06 07:00 PM 2009 C
% Last Change: Fri Nov 06 07:00 PM 2009 C
%
\documentclass[a4paper]{article}
\usepackage{polski}
\usepackage[utf8]{inputenc}


\begin{document}
ąśćółęźćż
\end{document}

3. Make fun:)

How to integrate Vim nad LaTex?

1. Download the latest update of vim-latex package from this location.

2. Extract it into your ./~vim directory

waldekd@waldekd-laptop:~/.vim$ tar zxf ../Desktop/vim-latex-1.5-20091002-r1074.tar.gz ./

3. Copy contents of the direction on appropriate level

waldekd@waldekd-laptop:~/.vim$ cp -r vim-latex-1.5-20091002-r1074/* ./

4. Open your vim's configuration file

waldekd@waldekd-laptop:~/Documents/Latex$ gvim /etc/vim/gvimrc

and add below text to it

REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on

" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'

5. Test your vim by open any .tex file

waldekd@waldekd-laptop:~/Documents/Latex$ gvim /home/waldekd/Documents/Latex/dyd.tex

6. Make fun :)

Thursday, November 5, 2009

How to convert .cue and .bin files into an .iso file

It is very simple. Only you need is bchunk so:
1) get it
sudo aptitude install bchunk
2) convert files
bchunk file.bin file.cue file.iso
3) mount file
sudo mount -o loop file.iso /media/output
4) make fun :)

SSH - if entering password annoys you...

You can avoid of entering remote host password every time you are logging on a host. It is very simple. Just follow the below steps.

Client side:
1. Generate new keys by using ssh-keygen command

waldekd@waldekd-desktop:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/waldekd/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/waldekd/.ssh/id_rsa.
Your public key has been saved in /home/waldekd/.ssh/id_rsa.pub.
The key fingerprint is:
12:da:79:13:03:32:4b:5d:9f:56:80:dc:f7:44:3a:1a waldekd@waldekd-desktop
The key's randomart image is:
+--[ RSA 2048]----+
| +..o.o..... |
| . +..o..o... |
| . . o E.oo |
| o o + o .. |
| . + S . |
| o . |
| |
| |
| |
+-----------------+

Don't enter any passphrase because if you do you will have to enter it every time you log. This operations generate a set of files inside of /home/your_login/.ssh/ directory.

2. Copy id_rsa.pub file on server. You can do it by log on server and get the appropriate file from the client

waldekd@waldekd-laptop:~$ scp waldekd@192.168.0.100:/home/waldekd/.ssh/id_rsa.pub .
ssh: connect to host 192.168.0.100 port 22: Connection refused
waldekd@waldekd-laptop:~$ scp waldekd@192.168.0.100:/home/waldekd/.ssh/id_rsa.pub .
id_rsa.pub 100% 405 0.4KB/s 00:00

3. Add information from the file to authorized_keys2 file

waldekd@waldekd-laptop:~/.ssh$ cat ../id_rsa.pub > authorized_keys2

4. Test

waldekd@waldekd-desktop:~/Documents$ ssh -C waldekd@192.168.0.101
Linux waldekd-laptop 2.6.27-15-generic #1 SMP Tue Oct 20 06:52:09 UTC 2009 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Thu Nov 5 17:47:31 2009 from 192.168.0.100

5. Make fun :)

Monday, November 2, 2009

Jak ukryć Śledzika? (tylko dla Firefox) :)

1) pobieramy plugin

2) instalujemy

3) w Firefoxie wybieramy 'Narzędzia' -> 'Dodatki' i zaznaczamy zakladke 'Style'

4) klikamy na 'Stworz nowy styl' w prawym dolnym rogu

5) nadajemy mu nazwe

6) w duzym polu tekstowym wpisujemy:

#sledzik_box{display:none;}

7) wciskamy 'zapisz' i gotowe

A jak nie wiemy jak coś zrobić to pytamy na GG:)

Mnie osobiście denerwują jeszcze prezenty i aukcje wobec czego dodaję

#main_gifts{display:none;}
#allegro_box{display:none;}

i jest OK:)

Friday, September 25, 2009

When run sqlplus the error appears: nls_lang.sh: 114: [[: not found

Solution is very simple: change the first line of this file from #! /bin/sha to #! /bin/bash and make fun :)

PL/SQL - Basics

Every PL/SQL program is made of PL/SQL code blocks. There are three types of PL/SQL code blocks:
1) anonymous - they are created in dynamic way and executed only once;
2) named:
- with etiquette - anonymous code blocks with an etiquette which allows to use variables declare inside of this code block;
- subprograms - function, procedures - stored in DB under some name and invoked many times;
- triggers - connected with DB events like invoking DML function (INSERT, UPDATE, DELETE) or DDL function (e.g CREATE, DROP)

Thursday, September 24, 2009

How to install Oracle XE under Ubuntu

Installation of Oracle database under the Ubuntu linux system is very simple. You have to go through a few simple step which could make you feel a real DB administrator :). So...

1) Add adequate key to your apt repository

waldekd@waldekd-laptop:~$ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
--2009-09-24 20:45:31-- http://oss.oracle.com/el4/RPM-GPG-KEY-oracle
Resolving oss.oracle.com... 141.146.12.120
Connecting to oss.oracle.com|141.146.12.120|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1744 (1.7K) [text/plain]
Saving to: `STDOUT'

100%[==================================================================================================================>] 1,744 --.-K/s in 0.01s

2009-09-24 20:45:31 (158 KB/s) - `-' saved [1744/1744]

OK


2) Update your repository

waldekd@waldekd-laptop:~$ sudo aptitude update
Hit http://pl.archive.ubuntu.com intrepid Release.gpg
Ign http://pl.archive.ubuntu.com intrepid/main Translation-en_US
Ign http://pl.archive.ubuntu.com intrepid/restricted Translation-en_US
Ign http://pl.archive.ubuntu.com intrepid/universe Translation-en_US
Ign http://pl.archive.ubuntu.com intrepid/multiverse Translation-en_US
Hit http://pl.archive.ubuntu.com intrepid-updates Release.gpg


3) Install Oracle DB

ldekd@waldekd-laptop:~$ sudo aptitude install oracle-xe
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
The following NEW packages will be installed:
libaio{a} oracle-xe
0 packages upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 221MB/221MB of archives. After unpacking 405MB will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Get:1 http://oss.oracle.com unstable/non-free oracle-xe 10.2.0.1-1.1 [221MB]
Fetched 188MB in 26min20s (119kB/s)
Selecting previously deselected package libaio.
(Reading database ... 6132459 files and directories currently installed.)
Unpacking libaio (from .../libaio_0.3.104-1_i386.deb) ...
Selecting previously deselected package oracle-xe.
Unpacking oracle-xe (from .../oracle-xe_10.2.0.1-1.1_i386.deb) ...
Processing triggers for man-db ...
Setting up libaio (0.3.104-1) ...

Setting up oracle-xe (10.2.0.1-1.1) ...
update-rc.d: warning: /etc/init.d/oracle-xe missing LSB style header
Executing Post-install steps...
-e You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.


Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done


4) Make some initial configuration

waldekd@waldekd-laptop:~$ sudo /etc/init.d/oracle-xe configure
[sudo] password for waldekd:

Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 10g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:n

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8080/apex"


5) Log in to an application to manage DB



6) Here you are :)



7) Sometimes after your system has been restarted there are some problems with user's permissions (you've got message "User [your_login] is not a member of group 'dba'". To solve it you have to simply add your user to dba group be using the following statement (change "waldekd" with your login):

waldekd@waldekd-laptop:~$ sudo usermod -a -G dba waldekd

Saturday, September 19, 2009

Know Your UNIX System Administorator -- A Field Guide

KNOW YOUR UNIX SYSTEM ADMINISTRATOR -- A FIELD GUIDE

There are four major species of Unix sysad:

1) The TECHNICAL THUG. Usually a systems programmer who has been
forced into system administration; writes scripts in a polyglot of the
Bourne shell, sed, C, awk, perl, and APL.

2) The ADMINISTRATIVE FASCIST. Usually a retentive drone (or rarely,
a harridan ex-secretary) who has been forced into system
administration.

3) The MANIAC. Usually an aging cracker who discovered that neither
the Mossad nor Cuba are willing to pay a living wage for computer
espionage. Fell into system administration; occasionally approaches
major competitors with indesp schemes.

4) The IDIOT. Usually a cretin, morpohodite, or old COBOL programmer
selected to be the system administrator by a committee of cretins,
morphodites, and old COBOL programmers.

HOW TO IDENTIFY YOUR SYSTEM ADMINISTRATOR:


---------------- SITUATION: Low disk space. ----------------

TECHNICAL THUG: Writes a suite of scripts to monitor disk
usage, maintain a database of historic disk usage, predict future disk
usage via least squares regression analysis, identify users who are
more than a standard deviation over the mean, and send mail to the
offending parties. Places script in cron. Disk usage does not
change, since disk-hogs, by nature, either ignore script-generated
mail, or file it away in triplicate.

ADMINISTRATIVE FASCIST: Puts disk usage policy in motd. Uses
disk quotas. Allows no exceptions, thus crippling development work.
Locks accounts that go over quota.


MANIAC:
# cd /home
# rm -rf `du -s * | sort -rn | head -1 | awk '{print $2}'`;


IDIOT:
# cd /home
# cat `du -s * | sort -rn | head -1 | awk '{ printf "%s/*\n", $2}'` | compress


---------------- SITUATION: Excessive CPU usage. ----------------

TECHNICAL THUG: Writes a suite of scripts to monitor
processes, maintain a database of CPU usage, identify processes more
than a standard deviation over the norm, and renice offending
processes. Places script in cron. Ends up renicing the production
database into oblivion, bringing operations to a grinding halt, much
to the delight of the xtrek freaks.

ADMINISTRATIVE FASCIST: Puts CPU usage policy in motd. Uses
CPU quotas. Locks accounts that go over quota. Allows no exceptions,
thus crippling development work, much to the delight of the xtrek
freaks.


MANIAC:
# kill -9 `ps -augxww | sort -rn +8 -9 | head -1 | awk '{print $2}'`

IDIOT:
# compress -f `ps -augxww | sort -rn +8 -9 | head -1 | awk '{print $2}'`


---------------- SITUATION: New account creation. ----------------

TECHNICAL THUG: Writes perl script that creates home
directory, copies in incomprehensible default environment, and places
entries in /etc/passwd, /etc/shadow, and /etc/group. (By hand, NOT
with passmgmt.) Slaps on setuid bit; tells a nearby secretary to
handle new accounts. Usually, said secretary is still dithering over
the difference between 'enter' and 'return'; and so, no new accounts
are ever created.

ADMINISTRATIVE FASCIST: Puts new account policy in motd.
Since people without accounts cannot read the motd, nobody ever
fulfills the bureaucratic requirements; and so, no new accounts are
ever created.

MANIAC: "If you're too stupid to break in and create your own
account, I don't want you on the system. We've got too many goddamn
sh*t-for-brains a**holes on this box anyway."

IDIOT:

# cd /home; mkdir "Bob's home directory"
# echo "Bob Simon:gandalf:0:0::/dev/tty:compress -f" > /etc/passwd


---------------- SITUATION: Root disk fails. ----------------

TECHNICAL THUG: Repairs drive. Usually is able to repair
filesystem from boot monitor. Failing that, front-panel toggles
microkernel in and starts script on neighboring machine to load binary
boot code into broken machine, reformat and reinstall OS. Lets it run
over the weekend while he goes mountain climbing.


ADMINISTRATIVE FASCIST: Begins investigation to determine who
broke the drive. Refuses to fix system until culprit is identified
and charged for the equipment.


MANIAC, LARGE SYSTEM: Rips drive from system, uses
sledgehammer to smash same to flinders. Calls manufacturer, threatens
pets. Abuses field engineer while they put in a new drive and
reinstall the OS.
MANIAC, SMALL SYSTEM: Rips drive from system, uses ball-peen
hammer to smash same to flinders. Calls Requisitions, threatens pets.
Abuses bystanders while putting in new drive and reinstalling OS.

IDIOT: Doesn't notice anything wrong.


---------------- SITUATION: Poor network response. ----------------

TECHNICAL THUG: Writes scripts to monitor network, then
rewires entire machine room, improving response time by 2%. Shrugs
shoulders, says, "I've done all I can do," and goes mountain climbing.

ADMINISTRATIVE FASCIST: Puts network usage policy in motd.
Calls up Berkeley and AT&T, badgers whoever answers for network
quotas. Tries to get xtrek freaks fired.

MANIAC: Every two hours, pulls ethernet cable from wall and
waits for connections to time out.

IDIOT:
# compress -f /dev/en0


---------------- SITUATION: User questions. ----------------

TECHNICAL THUG: Hacks the code of emacs' doctor-mode to answer
new users questions. Doesn't bother to tell people how to start the
new "guru-mode", or for that matter, emacs.

ADMINISTRATIVE FASCIST: Puts user support policy in motd.
Maintains queue of questions. Answers them when he gets a chance,
often within two weeks of receipt of the proper form.

MANIAC: Screams at users until they go away. Sometimes
barters knowledge for powerful drink and/or sycophantic adulation.

IDIOT: Answers all questions to best of his knowledge until
the user realizes few UNIX systems support punched cards or JCL.


---------------- SITUATION: *Stupid* user questions. ----------------

TECHNICAL THUG: Answers question in hex, binary, postfix,
and/or French until user gives up and goes away.

ADMINISTRATIVE FASCIST: Locks user's account until user can
present documentation demonstrating their qualification to use the
machine.

MANIAC:
# cat >> ~luser/.cshrc
alias vi 'rm \!*;unalias vi;grep -v BoZo ~/.cshrc > ~/.z; mv -f ~/.z ~/.cshrc'
^D

IDIOT: Answers all questions to best of his knowledge.
Recruits user to system administration team.


---------------- SITUATION: Process accounting management. ----------------

TECHNICAL THUG: Ignores packaged accounting software; trusts
scripts to sniff out any problems & compute charges.

ADMINISTRATIVE FASCIST: Devotes 75% of disk space to
accounting records owned by root and chmod'ed 000.

MANIAC: Laughs fool head off at very mention of accounting.

IDIOT:
# lpr /etc/wtmp /usr/adm/paact


---------------- SITUATION: Religious war, BSD vs. System V. ----------------

TECHNICAL THUG: BSD. Crippled on System V boxes.

ADMINISTRATIVE FASCIST: System V. Horrified by the people who
use BSD. Places frequent calls to DEA.

MANIAC: Prefers BSD, but doesn't care as long as HIS processes
run quickly.

IDIOT:
# cd c:


---------------- SITUATION: Religious war, System V vs. AIX ----------------

TECHNICAL THUG: Weeps.

ADMINISTRATIVE FASCIST: AIX-- doesn't much care for the OS,
but loves the jackboots.

MANIAC: System V, but keeps AIX skills up, knowing full well
how much Big Financial Institutions love IBM...

IDIOT: AIX.


---------------- SITUATION: Balky printer daemons. ----------------

TECHNICAL THUG: Rewrites lpd in FORTH.

ADMINISTRATIVE FASCIST: Puts printer use policy in motd.
Calls customer support every time the printer freezes. Tries to get
user who submitted the most recent job fired.

MANIAC: Writes script that kills all the daemons, clears all
the print queues, and maybe restarts the daemons. Runs it once a hour
from cron.

IDIOT:
# kill -9 /dev/lp ; /dev/lp &


---------------- SITUATION: OS upgrade. ----------------

TECHNICAL THUG: Reads source code of new release, takes only
what he likes.


ADMINISTRATIVE FASCIST: Instigates lawsuit against the vendor
for having shipped a product with bugs in it in the first place.

MANIAC:

# uptime
1:33pm up 19 days, 22:49, 167 users, load average: 6.49, 6.45, 6.31
# wall
Well, it's upgrade time. Should take a few hours. And good luck on that
5:00 deadline, guys! We're all pulling for you!
^D

IDIOT:
# dd if=/dev/rmt8 of=/vmunix


---------------- SITUATION: Balky mail. ----------------

TECHNICAL THUG: Rewrites sendmail.cf from scratch. Rewrites
sendmail in SNOBOL. Hacks kernel to implement file locking. Hacks
kernel to implement "better" semaphores. Rewrites sendmail in
assembly. Hacks kernel to . . .

ADMINISTRATIVE FASCIST: Puts mail use policy in motd. Locks
accounts that go over mail use quota. Keeps quota low enough that
people go back to interoffice mail, thus solving problem.

MANIAC:
# kill -9 `ps -augxww | grep sendmail | awk '{print $2}'`
# rm -f /usr/spool/mail/*
# wall
Mail is down. Please use interoffice mail until we have it back up.
^D
# write max
I've got my boots and backpack. Ready to leave for Mount Tam?
^D

IDIOT:
# echo "HELP!" | mail tech_support.AT.vendor.com%kremvax%bitnet!BIFF!!!


---------------- SITUATION: Users want phone list application. ----------------

TECHNICAL THUG: Writes RDBMS in perl and Smalltalk. Users
give up and go back to post-it notes.

ADMINISTRATIVE FASCIST: Oracle. Users give up and go back to
post-it notes.

MANIAC: Tells the users to use flat files and grep, the way
God meant man to keep track of phone numbers. Users give up and go
back to post-it notes.

IDIOT:
% dd ibs=80 if=/dev/rdisk001s7 | grep "Fred"


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@

OTHER GUIDELINES:


---------------- TYPICAL ROOT .cshrc FILE: ----------------


TECHNICAL THUG: Longer than eight kilobytes. Sources the
output of a perl script, rewrites itself.

ADMINISTRATIVE FASCIST: Typical lines include:
umask 777
alias cd 'cd \!*; rm -rf ching *hack mille omega rogue xtrek >& /dev/null &'

MANIAC: Typical lines include:
alias rm 'rm -rf \!*'
alias hose kill -9 '`ps -augxww | grep \!* | awk \'{print $2}\'`'
alias kill 'kill -9 \!* ; kill -9 \!* ; kill -9 \!*'
alias renice 'echo Renice\? You must mean kill -9.; kill -9 \!*'

IDIOT: Typical lines include:
alias dir ls
alias era rm
alias kitty cat
alias process_table ps
setenv DISPLAY vt100


---------------- HOBBIES, TECHNICAL: ----------------


TECHNICAL THUG: Writes entries for Obsfuscated C contest.
Optimizes INTERCAL scripts. Maintains ENIAC emulator. Virtual
reality .

ADMINISTRATIVE FASCIST: Bugs office. Audits card-key logs.
Modifies old TVs to listen in on cellular phone conversations.
Listens to police band.

MANIAC: Volunteers at Survival Research Labs. Bugs office.
Edits card-key logs. Modifies old TVs to listen in on cellular phone
conversations. Jams police band.

IDIOT: Ties shoes. Maintains COBOL decimal to roman numeral
converter. Rereads flowcharts from his salad days at Rand.


---------------- HOBBIES, NONTECHNICAL: ----------------


TECHNICAL THUG: Drinks "Smart Drinks." Attends raves. Hangs
out at poetry readings and Whole Earth Review events and tries to pick
up Birkenstock MOTAS.

ADMINISTRATIVE FASCIST: Reads _Readers Digest_ and _Mein
Kampf_. Sometimes turns up car radio and sings along to John Denver.
Golfs. Drinks gin martinis. Hangs out in yuppie bars and tries to
pick up dominatrixes.

MANIAC: Reads _Utne Reader_ and _Mein Kampf_. Faithfully
attends Dickies and Ramones concerts. Punches out people who say
"virtual reality." Drinks damn near anything, but favors Wild Turkey,
Black Bush, and grain alcohol. Hangs out in neighborhood bars and
tries to pick up MOTAS by drinking longshoremen under the table .

IDIOT: Reads _Time_ and _Newsweek_-- and *believes* them.
Drinks Jagermeister. Tries to pick up close blood relations-- often

COMPOUND SYSTEM ADMINISTRATORS:


TECHNICAL FASCIST: Hacks kernel & writes a horde of scripts to
prevent folk from ever using more than their fair share of system
resources. Resulting overhead and load brings system to its knees.

TECHNICAL MANIAC: Writes scripts that SEEM to be monitoring
the system, but are actually encrypting large lists of passwords.
Uses nearby nodes as beta test sites for worms.

TECHNICAL IDIOT: Writes superuser-run scripts that sooner or
later do an "rm -rf /".

FASCISTIC MANIAC: At first hint of cracker incursions, whether
real or imagined, shuts down system by triggering water-on-the-brain
detectors and Halon system.

FASCISTIC IDIOT:

# cp /dev/null /etc/passwd

MANIACAL IDIOT: Napalms the CPU.
-Stephan Zielinski

Song for C

Really good one :). Please give credit to mhtsa!australia!jason:basservax if the origins are requested.


"A Song for C" (To the tune of "The Girl from Ipanema")

slow and dumb and inefficient
the C compiler goes error seeking
and as it passes
each line it parses
it calls...

functions and more functions
trying to break up expressions
into the thirteen levels of precedence
the ops have

how can I try to improve it?
hoard up the tokens in buffers?
how can I stop the thing looping?
I can't do it all just for free
we need money for R&D

just leave out one semicolon
the parasitic errors roll on
and scroll the line
of the screen each time
as it screams...

old-fashioned initialization
use equals and try simplifying
near line eleven
plus or minus seven
or so

searching through linked lists of half-full
hash tables a la Berkeley
looking for every single
ident symbol
it finds

how can I possibly graft it
onto a stack architecture?
functional disunity!
and how can I tell PCC
its not coding for PDPs

slow and dumb and inefficient
the C compiler goes error seeking
and as it passes
each line it parses
it calls...
Recently I've come across a very funny page connected with the UNIX. It presents some possibilities how to the Unix could make you smiled in very simple way. Some examples was shown below.

Funny Unix csh/sh commands:

% cat "food in cans"
cat: can't open food in cans

% nice man woman
No manual entry for woman.

% make love
Make: Don't know how to make love. Stop.

% sleep with me
bad character

% got a light?
No match.

% man: why did you get a divorce?
man:: Too many arguments.

source

Saturday, September 12, 2009

How to install Debian GNU/Linux system in quasi-remotely way

There's plenty of methods to install Linux system on a server. I'd like to present on of them which can be used when you have some restricted access to server (for example because you are ill and you are sitting in front of your computer inside of your home and you can only count on a person who is next to your server but he's, let's say, "computer idiot"). What can you do in this situation? Go through this simple step-by-step guide and the answer comes to your mind on its own.

Friday, September 11, 2009

Linux - Debian - package manager

To manage some packages you can use apt or aptitude application.
Apt application contains:
- apt-get - tool used for managing packages (do not use it anymore)
- apt-cache - tool used for managing cached packages
- apt-cdrom tools used for managing packages there are on the CD-ROM
- apt-key - for key management.

Nowadays trends tell linux users to avoid of using apt-get and use aptitude.

Linux - Shell - scripts

Each shell scripts should start as following:

#!/bin/bash

Variables
There are three kinds of variables:
- special variables;
- environment variables;
- application's variable.

Special varibles
Provider information about some process.

$# - list of arguments
$0 - name of shell scripts
$1, $2,... - script's parameters
$* - list of parameters pass to the script ("$1 $2 ...")
$@ - list of parameters ("$1" "$2" ...)
$$ - gets PID of the current process
$? - returns code of the last run process
$! - returns PID of invoked process

Application's variables
Application's variable are typeless although you can create it by declare function. Variables can be declared anywhere in a shell script as was shown below:

waldekd@waldekd-laptop:~$ v="VARIABLE"
waldekd@waldekd-laptop:~$ echo $v
VARIABLE


Arrays
We can use only one dimensional arrays by declaring it in one of shown ways:

waldekd@waldekd-laptop:~$ tab={el1,el2}
waldekd@waldekd-laptop:~$ tab[1]={el3}
waldekd@waldekd-laptop:~$ declare -a tab
waldekd@waldekd-laptop:~$ echo ${tab[1]}
{el3}
waldekd@waldekd-laptop:~$ echo ${tab[*]} --> returns "elem_1 elem_2 elem_3"...
waldekd@waldekd-laptop:~$ echo ${tab[@]} --> returns "elem_1" "elem_2" "elem_3"...


You can undeclare an array's element by using unset command:

waldekd@waldekd-laptop:~$ unset tab[1]
waldekd@waldekd-laptop:~$ unset tab[*]
waldekd@waldekd-laptop:~$ unset tab[@]


Array length is available with the following command:

waldekd@waldekd-laptop:~$ echo ${tab[*]}

We cal also use systems' commands:

#!/bin/bash
command=$(pwd)
echo "Current directory is $command"


Evaluating of arithmetical expressions

To evaluate of arithmetical expression you can use let command:

#!/bin/bash
a=10
b=5
let sum=a+b
echo $sum


or double brackets

#!/bin/bash
a=10
b=5
sum=$(( a+b ))
echo $sum


or square brackets

#!/bin/bash
a=10
b=5
sum=$[ a+b ]
echo $sum

Linux - Shell - environment variables basics

The shell is some kind of interface that provides user with the possibility of communication with the Linux system. The most knowable shell is bash.

Environment variables
Environment variables are variables which can make some impact on processes inside of Linux system. Every process in system has a set of associated variables. To get list of environment variables you can use prinenv command:

waldekd@waldekd-laptop:~$ printenv
ORBIT_SOCKETDIR=/tmp/orbit-waldekd
GPG_AGENT_INFO=/tmp/seahorse-8cKqMm/S.gpg-agent:5663:1
SHELL=/bin/bash
TERM=xterm
XDG_SESSION_COOKIE=a49832786c8078ae002e75914a91479b-1252662128.49103-538825691
GTK_RC_FILES=/etc/gtk/gtkrc:/home/waldekd/.gtkrc-1.2-gnome2


Setting environment variable
To set an environment variable use export command:

waldekd@waldekd-laptop:~$ export MYVAR=myvar
waldekd@waldekd-laptop:~$ printenv MYVAR
myvar


waldekd@waldekd-laptop:~$ export PATH=$PATH:/home/waldekd/Desktop/

Aliases

If some of Linux commands (or theirs combination) seem to be more difficult (or hard) to user you can create an alias to them.

waldekd@waldekd-laptop:~$ alias ll='ls -al'

To unset alias unalias command is available:

waldekd@waldekd-laptop:~$ unalias ll

To get list of defined aliases you can use alias command:

waldekd@waldekd-laptop:~$ alias
alias ll='ls -al'

Wedding ;)

Linux - users and group of users

There are three user types in Linux systems:
- root (as known as superuser) - has all access to all parts of Linux system
- system user - connected with some services inside of the system
- normal user.

Users' data is stored in /etc/passwd file. Each of rows in this file is connected with one user. Structure of each row is shown below.

login:password:UID:GID:name:homedir:shell

login - user's identifier
password - user's password (now it is usually stored in /etc/shadow file due to security improvement)
UID - User ID - root UID = 0, systems acount UID=100-999, user accounts UID>1000
GID - Group ID - number of main group of user
name - user's name (usually name and surname)
homedir - home dir of user
shell - default shell for user

For example this file can look like the following one:

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh


As it was mentioned before user passwords are stored in /etc/shadow file. Structure of rows from this file was shown below:

login:password:date1:num1:num2:num3:num4:date2:res

login - user's login
password - user's password (encoded)
User is able to insert some special characters in this place:
! or *- means that this account has been blocked
!! - user has not set any password yet
date - date of last password modification
num1 - number of days before the next password modification
num2 - number of days to change the password
num3 - number of days when the system informs user about password expiration
num4 - number of days after the account is blocked
date2 - date of block of account
res - reserved field

Example entry was shown below:

waldekd:$1$AZK6J/bg$BLkas/oh3BKHRas0b.3/f0:14479:0:99999:7:::

Every user in the Linux-based system belongs to one or more groups. Main group number connected with the user is included in the /etc/passwd file.
Groups' data is included in /etc/groups file.Each row from the file has structure as was shown below:

gr_name:pass:GID:users

gr_name - group name
pass - group password
GID - Group ID
users - users assigned to this group

Example file:
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:waldekd
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:


All passwords connected with group are stored in /etc/gshadow file. Its structure is similar to /etc/shadow file:

gr_name:pass:admins:users

gr_name - name of group
pass - group's password
admins - group's admins
users - users assigned to this group.

To get info about users and groups you can use command listed below:

id - prints info about UID, GID and other group user belongs to.
For example:

waldekd@waldekd-laptop:~$ id
uid=1000(waldekd) gid=1000(waldekd) groups=4(adm),20(dialout),24(cdrom),46(plugdev),108(lpadmin),123(admin),124(sambashare),1000(waldekd)

waldekd@waldekd-laptop:~$ id root
uid=0(root) gid=0(root) groups=0(root)


groups - lists group user belongs to.

waldekd@waldekd-laptop:~$ id root
uid=0(root) gid=0(root) groups=0(root)


finger - gets info about user.

waldekd@waldekd-laptop:~$ finger waldekd
Login: waldekd Name: Waldemar Dacko
Directory: /home/waldekd Shell: /bin/bash
On since Fri Sep 11 11:42 (CEST) on tty7 from :0
2 hours 34 minutes idle
On since Fri Sep 11 12:16 (CEST) on pts/0 from :0.0
No mail.
No Plan.


Adding user
To add some new user you can use on of these command:
useradd - creates some new user or modifies default settings of existing one.

waldekd@waldekd-laptop:~$ sudo useradd -d /home/magdalena -g users -s /bin/bash magdalena

If some of the settings are not provided by you the system defaults they according to the /etc/default/useradd file.
useradd -D modifies default settings.

adduser - adds user to the system

VIM

Well, I have heard a lot of various comments about this editor, but according to me (and not only) this is the most advanced text editor in the world. But there are some people who smiled looking at this post... For these people VI is so hard to learn. I understand that you prefer some scintilla-engine-based editor (like Scite, Notepad++ and many others) to VIM - this is your choice of course. But try VI at first and then comment it.

Below I have presented excellent sheet covers most of the VI commands (http://www.viemu.com/)

Linux - how to get some help

There are various of methods which helps you in getting some help.
man - the best known way of getting help (e.g. man who)
info - hypertext help system (e.g. info who)
apropos - looking for text strings inside of database of system commands (e.g. apropos who)

Linux - Hierarchical directory according to the FHS standard

For the Linux operating systems there are two main standards determine hierarchy of directories in main file system: FSSTND and FHS. The FHS is an improved version of FSSTND which is addressed not only for Linux systems but also for other Unix-like distributions.
According to the FHS all files there are in some hierarchical structure with one root "/" (it does not depend on whether these files are on one logic disc or many).

/bin/ - basic executable files available for all users
/boot/ - bootloader files
/dev/ - files connected with devices
/etc/ - configuration files
/home/ - home directories of users
/lib/ - libraries for programs from /bin and /sbin directories
/mnt/ - using for mounting file systems
/media/ - mount-points for removable devices
/opt/ - application compiled in statical way
/proc/ - informs about processes state
/root/ - home directory for root user
/sbin/ - application using for system management
/tmp/ - temporary files
/usr/ - second-level hierarchy sharing between users
/var/ - various types of files

Saturday, April 4, 2009

Letter of application

Dear Sir or Madam

I have seen you job offer (ADV 10/09) on your website and I would like to apply. I am a 27-year-old Pole with a lot of commitment and motivation. I am friendly and open minded person with a lot of organizational skills and determination as well.

When I was a student I started working as a guide and it gave me a lot of enjoyment. Since then I have been really interested in it. Thanks to this job I was given a possibility to visit many European countries and familiarize with their histories what I can use working for you. Your job seems to be the perfect opportunity to combine the job with my passion.

My knowledge of English is very good and I have been improving it by attending some courses in one of the best English schools. Because of it confidently talking with people is not a problem for me.

I am sure I would make a success of this job and I hope you will consider my application.

Yours faithfully

Waldemar Dacko

Search This Blog