# HG changeset patch # User Oleksandr Gavenko # Date 1238407415 -10800 # Node ID 410741eab8806a641f8b64d9cb966f1e94fb7287 # Parent 921f4325779b5a665021da8d656ed03c6e0a6a78# Parent f27ef8848d2fa6a34949a208d41bea06315d0cae Automated merge with file:///srv/hg/admin-doc diff -r f27ef8848d2f -r 410741eab880 auto-proof.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/auto-proof.rst Mon Mar 30 13:03:35 2009 +0300 @@ -0,0 +1,49 @@ +-*- outline -*- + +* proofgeneral. + + $ sudo apt-get install proofgeneral + $ sudo apt-get install proofgeneral-coq + $ sudo apt-get install proofgeneral-misc + $ sudo apt-get install proofgeneral-doc + $ sudo apt-get install proofgeneral-minlog + +or build from source: + + $ make clean + $ make compile EMACS=xemacs + $ cat ~/.emacs +... +(load-file "dir/generic/proof-site.el") +... + +See + + http://proofgeneral.inf.ed.ac.uk/ + +* Isabelle. + +Isabelle is a generic proof assistant. + +It allows mathematical formulas to be expressed in a formal language and +provides tools for proving those formulas in a logical calculus. The main +application is the formalization of mathematical proofs and in particular +formal verification, which includes proving the correctness of computer +hardware or software and proving properties of computer languages and +protocols. + +See + + http://isabelle.in.tum.de/overview.html + http://en.wikipedia.org/wiki/Isabelle_(theorem_prover) + +* IsarMathLib. + +This site is an experimental HTML rendering of fragments of the IsarMathLib +project. IsarMathLib is a library of mathematical proofs formally verified by +the Isabelle theorem proving environment. The formalization is based on the +Zermelo-Fraenkel set theory. + +See + + http://isarmathlib.org/ diff -r f27ef8848d2f -r 410741eab880 bluetooth.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bluetooth.rst Mon Mar 30 13:03:35 2009 +0300 @@ -0,0 +1,14 @@ +-*- outline -*- + +* Debian. + + $ sudo apt-get install bluetooth + +* BlueZ. + +BlueZ is official Linux Bluetooth protocol stack. + +See + + http://www.bluez.org/ + bluez home page diff -r f27ef8848d2f -r 410741eab880 date.rst --- a/date.rst Fri Mar 27 11:35:05 2009 +0200 +++ b/date.rst Mon Mar 30 13:03:35 2009 +0300 @@ -12,7 +12,19 @@ $ sudo date --utc --set="2009-02-22 12:12:00" +"%Y-%m-%d %H:%M:%S" -and then timezone: +May be prefer use ntpdate(8) command. + +* Get timezone. + +System wide configuration: + + $ cat /etc/timezone + +* Get list of cupported timezone. + + $ tzselect + +* Set timezone. $ sudo tzconfig Your current time zone is set to Europe/Kiev diff -r f27ef8848d2f -r 410741eab880 digit-music.rst --- a/digit-music.rst Fri Mar 27 11:35:05 2009 +0200 +++ b/digit-music.rst Mon Mar 30 13:03:35 2009 +0300 @@ -147,3 +147,10 @@ See http://timidity.sourceforge.net/ + +* Notes. + +See + + http://mutopiaproject.org/index.html + diff -r f27ef8848d2f -r 410741eab880 git.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/git.rst Mon Mar 30 13:03:35 2009 +0300 @@ -0,0 +1,292 @@ +-*- outline -*- + +* Setup git. + +** Debian. + +For Etch Degian release use git-core package from backports, +old 1.4 version of git very dumb compared to new version 1.5. + + $ sudo apt-get install git-core + +After install setup some options: + + $ git config --global user.name "Oleksandr Gavenko" + $ git config --global user.mail "gavenkoa@gmail.com" + $ cat ~/.gitconfig +[user] + name = Oleksandr Gavenko + mail = gavenkoa@gmail.com + +* Start your project. + +Setup proj space on fs. + + $ mkdir proj + $ cd proj + $ git init +Initialized empty Git repository in /home/user/tmp/proj/.git/ + $ ls -a +. .. .git + +Add file, make changes, commit all. + + $ emacs Makefile +... C-x C-c + $ emacs app.c +... C-x C-c + $ git add Makefile app.c + $ git status +# On branch master +# +# Initial commit +# +# Changes to be committed: +# (use "git rm --cached ..." to unstage) +# +# new file: Makefile +# new file: app.c +# + +or just + + $ git add . + +Commit newlly added file: + + $ git commit +... Write message log ... +Created initial commit 2169263: My first commit massage. + 1 files changed, 4 insertions(+), 0 deletions(-) + create mode 100644 app.c + +* Undo tracking added file. + +You do + + $ git add badfile + $ git status +# On branch master +# Changes to be committed: +# (use "git reset HEAD ..." to unstage) +# +# new file: badfile +# + +To stop tracking badfile do + + $ git rm --cached badfile + $ git status +# On branch master +# Untracked files: +# (use "git add ..." to include in what will be committed) +# +# file +nothing added to commit but untracked files present (use "git add" to track) + +or + + $ git reset badfile + +* Doing changes. + + $ printf "clean:\nrm $(wildcard *.o)" >>Makefile + $ git diff +diff --git a/Makefile b/Makefile +index e84f7e9..cd2438a 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,2 +1,5 @@ + all: + @echo XXX + exit 1 ++ ++clean: ++ rm -f *.o +\ No newline at end of file + $ git add Makefile + $ git commit -m "Added clean target." +Created commit 11272b9: Added clean target. + 1 files changed, 1 insertions(+), 0 deletions(-) + create mode 100644 file + +or just + + $ git commit -a -m "Added clean target." + +* Using git to work with SVN offline. + +Prepare SVN and git utilities: + + $ sudo apt-get svn git-core git-svn + +Making SVN repo + + $ cd $HOME/tmp + $ svnadmin create svn-repo + $ svn co file://$HOME/tmp/svn-repo svn-devel + $ cd svn-devel + $ mkdir tags trunk branches + $ svn add * +A branches +A tags +A trunk + $ cd trunk/ + $ printf "all:\n echo XXX\n" >Makefile + $ printf "int main() {return 0;}" >main.c + $ svn add * + $ cd .. + $ svn st +A trunk +A trunk/main.c +A trunk/Makefile +A branches +A tags + $ svn ci -m init +Adding branches +Adding tags +Adding trunk +Adding trunk/Makefile +Adding trunk/main.c +Transmitting file data .. + $ svn cp -m v0.0 file://$HOME/tmp/svn/trunk file://$HOME/tmp/svn/tags/v0.0 + $ svn cp -m v0.1 file://$HOME/tmp/svn/trunk file://$HOME/tmp/svn/branches/v0.1 + +Moving SVN changset to git repo + + $ cd $HOME/tmp + $ git svn init file://$HOME/tmp/svn git-repo + $ ls -a +. .. .git + $ git svn fetch + A trunk/main.c + A trunk/Makefile +W: +empty_dir: branches +W: +empty_dir: tags +r1 = 52ccd9882979dd53ec198dbac108783ec660410f (git-svn) + A tags/v0.0/main.c + A tags/v0.0/Makefile +r2 = 8ec8a772bb6f37ace56b3649066dc84e481ed427 (git-svn) + M trunk/Makefile +r3 = 2c169ff409ed504dd6a092b1e302beb3fd94871e (git-svn) + A branches/v0.1/main.c + A branches/v0.1/Makefile +r4 = e68d76f4ba6beea4b9059c1884c1f38ce10831a7 (git-svn) + M trunk/Makefile +r5 = cdde63974454b13ac53f2eeb201aa76c49fd875c (git-svn) +Checked out HEAD: + file:///home/sasha/tmp/svn r5 + +or (in old git version): + + $ git svn clone file://$HOME/tmp/svn git-repo + +Making changes in svn: + + $ cd $HOME/tmp/svn-devel/trunk + $ echo ".PHONY: clean" >>Makefile + $ svn ci -m "Added clean to phony." +Sending trunk/Makefile +Transmitting file data . +Committed revision 6. + +Making committed in git: + + $ cd $HOME/tmp/git-repo/trunk + $ echo ".PHONY: all" >>Makefile + $ echo "int foo(int x) {return x+x;}" >>main.c + $ git status +# On branch master +# Changed but not updated: +# (use "git add ..." to update what will be committed) +# +# modified: Makefile +# modified: main.c +# +no changes added to commit (use "git add" and/or "git commit -a") + $ git commit -a -m "Bug fixed." +Created commit 222d399: Bug fixed. + 2 files changed, 2 insertions(+), 0 deletions(-) + +Getting changes from SVN to git: + + $ git svn rebase + M trunk/Makefile +r6 = 8165e9bfb38e9df09a7313d19606ec227629b670 (git-svn) +First, rewinding head to replay your work on top of it... +Applying Bug fixed. +error: patch failed: trunk/Makefile:6 +error: trunk/Makefile: patch does not apply +Using index info to reconstruct a base tree... +Falling back to patching base and 3-way merge... +Auto-merged trunk/Makefile +CONFLICT (content): Merge conflict in trunk/Makefile +Failed to merge in the changes. +Patch failed at 0001. + +When you have resolved this problem run "git rebase --continue". +If you would prefer to skip this patch, instead run "git rebase --skip". +To restore the original branch and stop rebasing run "git rebase --abort". + +rebase refs/remotes/git-svn: command returned error: 1 + $ git add Makefile + $ git rebase --continue +Applying Bug fixed. + +and return all from git to SVN: + + $ git svn dcommit +Committing to file:///home/sasha/tmp/svn ... + M trunk/Makefile + M trunk/main.c +Committed r7 + M trunk/main.c + M trunk/Makefile +r7 = 68e782c8d06635f2db4dd69b9ca8599f99da22e2 (git-svn) +No changes between current HEAD and refs/remotes/git-svn +Resetting to the latest refs/remotes/git-svn + +See what going to SVN repo: + + $ cd $HOME/tmp/svn-devel/trunk + $ svn diff -r BASE:HEAD +Index: Makefile +=================================================================== +--- Makefile (working copy) ++++ Makefile (revision 7) +@@ -6,4 +6,4 @@ + .o: .c + $(CC) $(CFLAGS) -c -o $@ $< + +-.PHONY: clean ++.PHONY: all clean +Index: main.c +=================================================================== +--- main.c (working copy) ++++ main.c (revision 7) +@@ -2,3 +2,4 @@ + { + return 0; + } ++int foo(int x) {return x+x;} + $ svn up +U Makefile +U main.c +Updated to revision 7. + +* gitk + +gitk - The git repository browser + +Installing: + + $ sudo apt-get instal gitk + +Using: + + $ cd /path/to/git-repo + $ gitk + +See + + gitk(1) diff -r f27ef8848d2f -r 410741eab880 laser-disk.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/laser-disk.rst Mon Mar 30 13:03:35 2009 +0300 @@ -0,0 +1,43 @@ +-*- outline -*- + +* What best DVD-R or DVD+R? + +The DVD-R format was developed by Pioneer in 1997 vc DVD+R in 2002 by Sony. + +DVD+R format was not an official DVD format until January 25, 2008. + +DVD-R(W) and DVD+R(W) format are incompatible. + +DVD-R(W) use amplitude modulation, DVD+R(W) use phase modulation, so more reliable. + +On multi-session DVD-R(W) disk any session take up to 96 MB in time on DVD+R(W) +every session take exactly 2 MB. + +DVD+R(W) win! + +See + + http://en.wikipedia.org/wiki/DVD-R + http://en.wikipedia.org/wiki/DVD%2BR + +* What capacity of DVD? + ++----------+-------------------------------------------+ +| | Capacity | ++ Type +-----------+---------------+------+--------+ +| | sectors | bytes | GB | GiB | +| | 2,048B | | | | ++----------+-----------+---------------+------+--------+ +|DVD-R (SL)| 2,298,496 | 4,707,319,808 | 4.7 | 4.384 | +|DVD+R (SL)| 2,295,104 | 4,700,372,992 | 4.7 | 4.378 | +|DVD-R DL | 4,171,712 | 8,543,666,176 | 8.5 | 7.957 | +|DVD+R DL | 4,173,824 | 8,547,991,552 | 8.5 | 7.961 | ++----------+-----------+---------------+------+--------+ + + + + + + + + diff -r f27ef8848d2f -r 410741eab880 logging.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/logging.rst Mon Mar 30 13:03:35 2009 +0300 @@ -0,0 +1,34 @@ +-*- outline -*- + +* Logging libs for c/c++. + +See below. Note that this libs complicate and its goal to provide +functionality similar to log4j. + +** log4c. + +See + + http://log4c.sourceforge.net/ + +** log4cplus. + +See + + http://log4cplus.sourceforge.net/ + +** Log for C++. + +Stop maintained at 2003. + +See + + http://log4cpp.sourceforge.net/ + +* log4j. + +Apache log4j is a Java-based logging utility. + +See + + http://logging.apache.org diff -r f27ef8848d2f -r 410741eab880 ntp.rst --- a/ntp.rst Fri Mar 27 11:35:05 2009 +0200 +++ b/ntp.rst Mon Mar 30 13:03:35 2009 +0300 @@ -2,18 +2,19 @@ * What is NTP? -NTP is a protocol to set time on host using publicaly available NTP servers with right -time. +NTP is a protocol to synchronizing the clocks on host using publicly +available NTP servers. * How use? To use you must know NTP servers. Here list some of them: -0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org +0.debian.pool.ntp.org 1.debian.pool.ntp.org +2.debian.pool.ntp.org uk.pool.ntp.org ua.pool.ntp.org -Soem servers in national - can be found as ISO 639 code with .pool.ntp.org suffix. - +Some servers are national. They can be found as ISO 639 code with +.pool.ntp.org suffix. ** Debian. @@ -23,5 +24,11 @@ and sync date with some NTP server: - # sudo ntpdate 0.debian.pool.ntp.org + # sudo ntpdate 0.debian.pool.ntp.org + +** Windows. +See + + http://support.microsoft.com/kb/q216734/ + http://support.microsoft.com/kb/q223184/ diff -r f27ef8848d2f -r 410741eab880 prog-install.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prog-install.rst Mon Mar 30 13:03:35 2009 +0300 @@ -0,0 +1,39 @@ +-*- mode: outline; coding: utf-8 -*- + +* Linux. + +Вообще используем систему пакетов, но если в репозиториях дистрибутива нет +соотведствующего пакета см. рецепты ниже. + +** Без прав root. + +Лучшим решением, если у Вас нету прав root, будет установить ее в домашнем +каталоге. Тут дело личных предпочтений. У меня это ~/usr. + +Если программа в бинарном виде - просто распаковываем: + + $ cd /your/temp/dir + $ gzip -d -c prog.tar.gz | tar xf - + $ mv prog/* ~/usr + +Если программу придестя собирать из исходников, +почти всегда можно указать ключ --prefix: + + $ configure --prefix=$HOME/usr + $ make + $ make install + +Обычно run-инсталляторы разархивируют содержимое в $PWD/. +В любом случае + + $ ./nvidia-driver-1.2.9.run --help + +** С правами root. + +Если вы root то по Linux FHS ставим в /opt. + +Смотри: + + http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard + +Не забываем обновить переменную окружения PATH! diff -r f27ef8848d2f -r 410741eab880 video-file.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/video-file.rst Mon Mar 30 13:03:35 2009 +0300 @@ -0,0 +1,23 @@ +-*- outline -*- + +* Players for linux? + + $ sudo apt-get install vlc +or + $ sudo apt-get install mplayer + +* How convert .3gp to .avi(mpeg)? + +First install convertor: + + $ sudo apt-get install ffmpeg + +Then do: + + $ ffmpeg -i video-in.3gp -b 250 -s 160×120 -r 15 -f avi -an video-out.avi +or + $ mencoder -oac mp3lame -ovc lavc -o video-out.avi -vf pp,2xsai,scale video-in.3gp +or + $ mencoder -o video-in.avi -vf pp,2xsai,scale -ovc lavc video-out.3gp +or + $ mencoder -o video-in.avi -vf rotate=2 -oac pcm -ovc divx4 video-out.3gp