About me

My name is Andrey Zakharov. I'm talented software engineer.
My BrainBench Page

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

Makefile.patcher

#
# Checking and applying patches against any source or specified sources
#
# @author Andrey Zakharov /2010/
# @usage make clean trunk-prepare all run
Vaulter's picture

Average counting by AWK

#
# Andrey Zakharov 2010-03-04 <admin@vaultsoft.ru>
# Average the columns
# input text template:
# <code>
# Any string that non all of numbers (cmd)
# #, column2 name, column3 name, ..., columnN name ( note # at the front - required )
# num11, num12, ..., num1N
# num21, num22, ..., num2N
# num31, num32, ..., num3N
# ...
# numM1, numM2, ..., numMN
# </code>
# Output:
# <code>
# #, column2 name, column3 name, ..., columnN name
# CMD, avg1, avg2, ..., avgN
# </code>
#
# Note: if awk fail to sum value from column, no avg for this will be print, and newline inserted, SORRY
# Used for prepare bench results to csv format
Vaulter's picture

Conky RSS

#!/bin/bash
# RSS Display Script by Andrey Zakharov (admin@vaultsoft.ru) v0.1
#
# This script is designed to output story bodies for most any RSS Feed.
#
# This script depends on wget, xsltproc, sed.  Please ensure it is installed and in your $PATH
# Debian: apt-get install wget xsltproc sed
#
# Usage:
# .conkyrc:     ${execpi [time] /path/to/script/conky-rss.sh URI LIMIT}
#   URI = Location of feed, ex. http://bash.org.ru/rss/
#   LINES = How many items to display (default 5)
#
# Usage Example
#   ${execi 300 /home/youruser/scripts/conky-rss.sh http://www.foxnews.com/xmlfeed/rss/0,4313,1,00.rss 4}
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=$*"
}
Syndicate content