Vaulter's picture

Полезные команды linux shell

dd if=/dev/hda1 bs=1k conv=sync,noerror | gzip -c | ssh -c blowfish user@example.com "dd of=filename.gz bs=1k"

Копирование данных с /dev/hda1, сжатие и перенос их по сетевому протоколу ssh на машину example.com в файл filename.gz.

dd if=filename.gz | ssh -c blowfish root@deadhost "gunzip -c | dd of=/dev/hda1 bs=1k"

Обратная процедура выше приведенной.

Vaulter's picture

Instant creation of UML sequence diagrams

Have you ever wanted to share your knowledge to someone else, who havent got the process well enough? Have you ever trying to make you solution plain to your colleges? If he or she are close to you, in the same room, the best way is to use paper and draw diagram in pencil. But if someone are far from you and only communication channel available, the only way is e-mail your drawings and comments.
Long ago, standard UML was put out as a graphical representation of a system's model. And recently, smart men come up with SD / MSC Generator, which situated on the site websequencediagrams.com. There are also sites to generate other types of UML diagrams, but now want to talk about this particular one.

Vaulter's picture

How to make wine + totalcmd associate files with KDE applications

I often work in Total Commander, despite the fact that I was sitting in Ubuntu:) Got up the need to quick open, for example, html to Kate, and edit by UEStudio (left from my era of Windows) is not handy. At the first, we need to somehow associate file types out of a wine with the file types of native OS. That is, that formed such scheme: TotalCMD -> wine -> ... -> Kdm (or that handles the associations in ubuntu) -> Target program. And out there!

Vaulter's picture

Konqueror your man

##
# for your .bashrc
# Manual browsing
# Konqueror can show you man pages as well html
# @author Andrey Zakharov /aka Vaulter/
# @author ramok
man()
{
    [ -n "$DISPLAY" ] &&  konqueror "man:/$*" 2>/dev/null & ||  man $*
}
Vaulter's picture

Google search from command line

##
# Perform google search from command line
# <usage>g well linux c%2b%2b engineer</usage>
# @TODO url decode
g() {
    if [ -n "$DISPLAY" ] &&
        env x-www-browser "http://www.google.com/search?hl=${LANG%%_*}&q=$*" & ||
        env www-browser "http://www.google.com/search?hl=${LANG%%_*}&q=$*"
}
Vaulter's picture

Первый ребенок на python

# -*- coding: utf-8 -*-
__author__="vaulter"
__date__ ="$05.09.2009 22:03:27$"
"""
    Это мой первый скрипт на python
    Он переименовывает файлы, имена которых не содержат номера
    согласно таблице, считанной из указанного cvs файла.
   
    То есть, иными словами, есть таблица
    One, 1
    Two, 2
   
    И есть файлы
    1. One.avi
    Two.avi
   
Vaulter's picture

Мир разукрасили тремя цветами в 2009

...видна например Турция, к этой же категории отнесена Колумбия. Еще бы. Какая-то область на севере Афганистана... Границы между Индией и Пакистаном. Нестабильность также на всем западном побережье Африки.
Нас с Китаем отнесли к одной категории - пока не наше, наверное, или "пока не рабы".

Vaulter's picture

How to instant fast quick analyze core dump files

Something about subject you may know, but let me summarize.
gdb is the tool, which can analyze core file.

Check the your version:
$ gdb --version
I will talk about
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
This GDB was configured as "x86_64-linux-gnu".

Syntax of command line is:
$ gdb [bin] [core]

The most rapid command is:
$ gdb core.12345
which prints binary of core, and the reason of core ( Aborted, Segmentaion Fault, and so on )

Syndicate content