tag:blogger.com,1999:blog-72573486348694506342024-03-13T12:58:04.452+02:00Моите коментариБлогът на Емил ГеоргиевEmil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-7257348634869450634.post-40678321136312546702019-01-15T18:37:00.001+02:002019-01-15T18:37:11.414+02:00watch command as a shell scriptThe command 'watch' is part of <b>procps</b> package in Linux distributions - The list of other commands is available in the package's <a href="https://gitlab.com/procps-ng/procps/blob/master/README.md" target="_blank">README.md</a>.<br />
Unfortunately Mac OS X is missing this command.<br />
If you don't want to use brew or port to install the watch command, the following bash script is a<br />
useful substitution:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">while true ; do new_value="$(eval "$@")"; test "$new_value" = "$old_value" || echo -e "(dowatch: $(date)) \n $new_value"; old_value="$new_value" ; sleep 5 ; done</span><br />
<div>
<br /></div>
<div>
<br /></div>
<div>
Put the above line in file <span style="font-family: "courier new" , "courier" , monospace;">~/bin/dowatch</span></div>
<div>
Make <span style="font-family: "courier new" , "courier" , monospace;">dowatch</span> executable: <span style="font-family: "courier new" , "courier" , monospace;">chmod +x ~/bin/dowatch</span></div>
<div>
<br /></div>
<div>
Example use:</div>
<div>
<br /></div>
<div>
Monitor file <span style="font-family: "courier new" , "courier" , monospace;">big.log</span> and list file info and number of lines when the file changes:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">$ ~/bin/dowatch "ls -l big.log ; wc -l big.log"</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: inherit;">The output of the example command would be like:</span></div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">(dowatch: Tue Jan 15 18:28:46 UTC 2019) </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> -rw-r--r-- 1 jenkins staff 146 Jan 15 18:25 big.log</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> 2 big.log</span></div>
</div>
Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-45325562764186888732017-05-21T02:18:00.002+03:002017-05-21T02:18:30.661+03:00Кофите пред моя блокИмаме си място за кофи за боклук долу пред блока, точно до моя вход. Много е удобно! Кофите варират с времето. Бяха само метални кофи, когато Wolf извозваше боклука в София. После дойдоха и пластмасовите на Еко Бул Пак - зелена кофа за стъкло и жълта - за хартия, метал и пластмаса. После АЕС Бат Х Петел замениха металните кофи с жълти кофи. Така имахме една жълта кофа за хартия, метал и пластмаса, и една жълта кофа за общ боклук. Малко неудобно беше и много хора бъркаха кофите, включително и аз. Затова надписах с черен спрей на едната, че е за "хартия, метал и плстмс", но продължих да ги бъркам. После Еко Бул Пак смениха жълтата кофа за хартия, метал и пластмаса с оранжева, от тези с тесния отвор, дето се псуваш че си събирал цяла торба хартия, метал и пластмаса, пък не можеш да я набуташ в отвора на кофата. На една друга оранжева кофа, на две преки от блока, някой находчиво е изрязал по-широк отвор. Малко е грозно, но е по-удобно. А нашата оранжева кофа я изгориха. И зелената кофа за стъкло замина покрай нея. Еко Бул Пак сложи нови кофи, обаче този път изгориха всички. Сега имаме само метални кофи за общ боклук, а аз си хвърлям торбите с метал, хартия и пластмаса в оранжевата кофа с находчиво по-големия отвор на две преки от блока.<br />
Започнах да събирам разделен боклук, защото като студент отидох на лагер в Чехия и, освен забавните вечери, имахме и полезни делници, в които разчистихме едно по-старо бунище на село Пжредхради. Превърнахме го в крайпътна полянка. Нашата работа беше да разделим боклуците, така че което може да се преизползва, да отиде на вторични суровини, а което може да изгние, да бъде извадено от опаковката си. Беше неприятна задача, но ме убеди, че трябва да разделяме боклука.<br />
Струва ми се, че по-малка част от хората са готови сами до положат грижа за разделното събиране на боклука си, повечето имат нужда от стимул, за да го правят, а една част са убедени противници. Мисля си, че хората които палят кофите за разделно събиране на боклук, искат да събират разделен боклук, за да го връщат на вторични суровини и се дразнят, че не могат да вземат боклука от кофите на Еко Бул Пак. От заяждане за пари страда разделното събиране на боклука. Самият факт, че хартията, метала, пластмасата и стъклото не отиват на бунището, е печалба. Кофите за разделно събиране, трябва да позволяват, който иска, да взима боклук от тях, за да го предава на вторични суровини.Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-44136904909167557012014-05-27T04:33:00.000+03:002014-05-27T04:33:21.976+03:00xfce4-unzipall.shBash script to unzip one or more zip files into newly created directories and open each directory in separate xfce4 file explorer window (thunar).<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">#!/bin/bash</span><br />
<span style="font-family: "Courier New",Courier,monospace;">for file; do<br /> exdir="${file%.zip}"_zip_files/<br /> unzip -x "$file" -d "$exdir"<br /> thunar "$exdir"<br />done</span><br />
<br />Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-65828030182100517592013-11-20T03:42:00.001+02:002014-06-02T00:47:57.150+03:00Watch Emerging package in gentooRun the emerge command and redirect the output to a file.<br />
<span style="font-family: serif;">Then watch which package is being emerged.</span>
<br />
<pre>nohup emerge -DuNv @world &</pre>
<pre><pre>watch 'grep Emerging nohup.out|tail -n1'</pre>
<pre>
</pre>
Don't do it like me before:
<strike>watch eval echo '\"$(grep Emerging nohup.out|tail -n1)\"'</strike>
</pre>
<pre>
</pre>
Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com1tag:blogger.com,1999:blog-7257348634869450634.post-85220576038818573772013-09-10T03:23:00.001+03:002013-09-10T03:23:32.695+03:00afterlines.sh - Print the number of lines after last occurance of the PATTERN in the LOGFILE<pre>
#!/bin/bash
PATTERN="$1"
LOGFILE="$2"
function exit_usage() {
echo "USAGE: `basename $0` PATTERN LOGFILE
Print the number of lines after last occurance of the PATTERN in the LOGFILE" >&2
exit 22
}
if [ $# != 2 ]; then
exit_usage
fi
if [ ! -e "$LOGFILE" ]; then
echo "The file '$LOGFILE' does not exists!" >&2
exit_usage
fi
grep "`grep "$PATTERN" "$LOGFILE" | tail -n 1`" "$LOGFILE" -A 99999999|wc -l
</pre>
<P>
<CENTER>◆</CENTER>Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-16358194585325026252012-12-23T01:58:00.000+02:002012-12-23T01:58:56.183+02:00КраятКакъв е краят, който търся?
Това е една тема, толкова важна за мен, че предпочитам да мълча за нея.
Но колкото повече мълча, толкова по-важна става тя за мен.
Какъв е краят, който аз желая?
Чий е този край?
На аз?
Мен ли няма да ме има?
Не може да бъде.
То май наистина не е.
Хич го няма.
Ех този край,
за който все желая да мълча,
дано да бъде хубав,
а дотогава, не сега.Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-73189254697721312552012-10-12T01:01:00.001+03:002012-10-12T01:09:37.044+03:00Are computers able to live and to change?
Real understanding believes in real things. When you understand something, really, you believe that something is real. When you believe in it you don't want to change it.
In real understanding there are real things but what we seem to forget is that these things are only real understandings from the Superstanding.
There are three levels of understanding, as said Hermes Trismegistus. Copying or repeating is the first level of translation. Interpretation is the second. Interpretation is like singing a song for God. You can find thousands of words about It and you won't be wrong as long as your heart is seeing It. The third level of understanding is translation of one thing inside another understanding. This is when you allow your understanding to live and to change.
Computers are good in copying and repeating. They are doing pretty well in translating from one language to another which is almost like knowing what you are talking about no matter which exact words you name It. Are computers able to live and to change? Am I able to recognize the understanding outside me? Sometimes yes, sometimes no, sometimes who knows It?Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com2tag:blogger.com,1999:blog-7257348634869450634.post-46975805753230241282012-02-13T03:08:00.001+02:002012-02-13T03:12:29.117+02:00List files in current directory recursively, sorted by modified time.<br /><br /><code><br />find . -type f -print0 |xargs -0 ls --full-time --sort=time<br /></code>Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-37711263066433114252011-01-22T02:06:00.001+02:002011-01-22T02:08:45.531+02:00Едно изречение и други глупостиАко имаме всичко, ще се наситим твърде бързо.<br />От това, което имаме, ще имаме да взимаме,<br />ама друг път.Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-72780490216605353442010-12-17T01:29:00.003+02:002010-12-17T01:38:43.762+02:00tokenize 999 millions# tokenize numbers up to 999 millions by adding spaces on every 3th most significant digit starting from the most unsignificant.<br /><code><br />sed -e '<br /> s/\([[:digit:]]\{3\}\)\([[:digit:]]\{3\}\)\([[:digit:]]\{3\}\)/ \1 \2 \3/<br /> s/\([[:digit:]]\{2\}\)\([[:digit:]]\{3\}\)\([[:digit:]]\{3\}\)/ \1 \2 \3/<br /> s/\([[:digit:]]\{1\}\)\([[:digit:]]\{3\}\)\([[:digit:]]\{3\}\)/ \1 \2 \3/<br /> s/\([[:digit:]]\{3\}\)\([[:digit:]]\{3\}\)/ \1 \2/<br /> s/\([[:digit:]]\{2\}\)\([[:digit:]]\{3\}\)/ \1 \2/<br /> s/\([[:digit:]]\{1\}\)\([[:digit:]]\{3\}\)/ \1 \2/<br /> s/^\([[:digit:]]\{3\}\)[^[:digit:]]/ \1/<br /> s/^\([[:digit:]]\{2\}\)[^[:digit:]]/ \1/<br /> s/^\([[:digit:]]\{1\}\)[^[:digit:]]/ \1/<br />'<br /></code>Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-29473261067440075442010-08-04T01:20:00.003+03:002010-08-04T01:30:15.105+03:00record iso image to dvd-rw with cdrecord under Linux<pre>cdrecord -v dev=3,0,0 blank=fast image.iso</pre><br /><br />I found that <pre>dev</pre> should be equal to <pre>3,0,0</pre> from the command<br /><pre>cdrecord -scanbus</pre><br />which listed <br /><pre><br />scsibus3:<br /> 3,0,0 300) 'Optiarc ' 'DVD RW AD-7200S ' '1.06' Removable CD-ROM<br /></pre>Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-32115713910656413972010-05-11T03:12:00.000+03:002010-05-11T03:12:21.510+03:00The BlackBerry Developer: Why must the device be restarted after an application update? Does this indicate problems in the future?<a href="http://theblackberrydeveloper.blogspot.com/2006/09/why-must-device-be-restarted-after.html#links">The BlackBerry Developer: Why must the device be restarted after an application update? Does this indicate problems in the future?</a><br /><br />The proper way to distribute reusable code is make it a library. That's what RIM declare.<br />That means that every new application that use newer version of the library will install this version and force all other applications to remain compatible with the new version of the library.Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-60325255674220325742009-07-05T01:10:00.002+03:002009-07-05T03:24:56.171+03:00Why free softwareWhy open source? I asked a friend what are the borders of the programming. He<br />said they are the borders of what you can imagine. If you can imagine the <br />process you can describe it in a programming language.<br />With free software you have not only the freedom to imagine how the process<br />works but to see it. It is there, it is written. All parts of the process with<br />all involving issues are in the program code.<br />So whenever you wonder is the process set up as you expect you can see it in <br />the source code.<br />The programs are to be read from the people and from time to time executed.<br /><br />If art interprets our dreams, the computer executes them in the guise of programs! <br />Alan J. Perlis, <a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-5.html#%_chap_Temp_2">Structure And Interpretation of Computer Programs</a>Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-47969452464529319882009-01-28T23:14:00.002+02:002009-07-05T01:09:48.391+03:00А какво е <a href="http://oggin.net/vile/failure/">гуугъл бомба</a>?Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-57242499746783811882009-01-06T05:52:00.007+02:002009-01-12T23:04:06.810+02:00Стивън Фрай за Свободен Софтуер<a href="http://www.gnu.org/fry">Честита 25 годишнина на ГНУ</a><br /><br /><a href="http://www.toleranta.org/happy-birthday-to-gnu.avi"><br /><img src="http://www.gnu.org/fry/i/fryfry.png"/><br /></a><br /><br />Само субтитри, <a href="http://www.toleranta.org/happy-birthday-to-gnu.srt">тук!</a>Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-31647232064083827862008-11-03T01:59:00.013+02:002009-01-28T23:31:21.281+02:00Да живее LISPВече втора неделя съм на курса на Масачузетския Технологичен Институт "<a href="http://mitpress.mit.edu/sicp/">Структура и интерпретация на програмите</a>". Да живее LISP!<br />Води го <a href="http://doganov.org">Калоян Доганов</a><br /><br /><a href="http://www.defmacro.org/ramblings/lisp.html">The Nature of LISP</a><br /><a href="http://www.gentoo.org/proj/en/lisp/index.xml">Gentoo LISP групата</a><br /><a href="http://repo.or.cz/w/gentoo-lisp-overlay.git">Gentoo Lisp Overlay</a><br /><br /><a href="http://docs.google.com/Doc?id=dcnfmb3p_5cj3jpdft">Записки от курса</a> <br /><a href="http://toleranta.org/cgi-bin/viewvc.cgi/sicp/sicp.odt">OpenOffice формат</a><br /><br />И още нещо впечатляващо, <a href="http://www.vbox7.com/play:2226528b">Речта на Стив Джобс</a>Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com2tag:blogger.com,1999:blog-7257348634869450634.post-36514410936704388212008-09-06T23:15:00.005+03:002008-09-06T23:24:52.248+03:00What do I think about my self?<br /><br />Emil Georgiev<br />In the company since: 1998.<br />Responsibility in the Company: Writing software, releasing software and customers support.<br />As a philosopher by spirit the inspiration by the software gives him infinite boundaries to the imagination. The reflective nature of the software by his opinion is the key to distinct the rules to be automated and the creativity of the universe causing the failures of the rules. Keeping the rules clear and automated gives a level of predictability which could be expanded by observing the casualties and reflecting them to the rules. The human factor in safety critical applications is the fact that there is no single understanding or single set of rules we think in. Creating user interface with the thought in mind how the user think is one of the most interesting challenges in his work.<br />Hi is the responsible person from DISY who will keep a closer look of all the activity of the AFFOSA project.<br /><br />How someone understand that?<br /><br />Emil Georgiev<br />In the company since: 1998. Responsibility in the Company: Writing software, releasing software and customers support. Within DISY he is responsible for deciding the degree of automation software is supposed to implement. Taking the human factor into account, he is also responsible for investigating the understanding of humans regarding the rules that implement the automation. In this sense creating user interface with the thought in mind how the user think is one of the most interesting challenges in his work.<br />Hi is the responsible person from DISY who will keep a closer look of all the activity of the AFFOSA project.Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-15228634572970833802008-02-15T01:03:00.001+02:002008-02-15T01:04:47.603+02:00СърцетоТова демонче в живота което казва "Аз се чувствам объркан", не ме<br /> оставя никога. Когато е щастливо, тогава съм спокоен. През цялото<br /> време то пита: какво правиш за мен? Това ли е, което искам.<br /> Когато то се чувства добре, тогава аз се чувствам на място. То ми<br /> казва какво да правя и какво да не правя. То ми създава главоболие, то<br /> спира дъха ми и мисълта ми, то ме дарява с чувство на живот. То е<br /> което живее или дреме, отхвърлено от заетия. То е което казва има ли<br /> смисъл или не. То е, което потрепва, да не бъде наранено. То<br /> е, което жадува и раздава любов.<br /> То е, което се изявява, то има скрити заложби, негово е царството<br /> небесно и за него са даровете земни. От него извира смисъла и в него<br /> пак се връща. То е сърцето на Вселената. То знае най-добре следващата<br /> мисъл. То знае най-добре следващата стъпка. Негова е грижата за<br /> най-доброто, което мога да направя. А у мен е само ключът към сърцето<br /> ми.<br /> Не аз имам нужда от изява, а то. Не аз ще си донеса щастие, а на него<br /> ще донеса щастие и то на мен. Не аз покровителствам знанието, а то е<br /> негов наставник. За него са даровете на земята и небесното царство.<br /> По-хубаво от мен може да пише само то.<br /> Не е нужно да измисялм, след като то вече го знае.<br /> За него си струва да дам обед на вярност, макар винаги да се обичаме и<br /> вечно да сме заедно.Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com0tag:blogger.com,1999:blog-7257348634869450634.post-23956999449613786332008-02-11T23:23:00.000+02:002008-02-11T23:42:11.689+02:00Блог срещаТук е място за блог среща.<br /> This is a place for blog meeting.<br /> Сдесь место встречастя в блога.Emil Ogn. Georgievhttp://www.blogger.com/profile/14430898142965639600noreply@blogger.com1