# HG changeset patch # User Oleksandr Gavenko # Date 1336338983 -10800 # Node ID 454edc8dfd1835b2c39a568b4dd5ae2c49d471ec # Parent 08f4dc604da209efa430e9d16b2d6aeea25e0582# Parent 1ea412c9aefbecf6b8c92536cf9a2eb788a80f0f merged diff -r 1ea412c9aefb -r 454edc8dfd18 README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Mon May 07 00:16:23 2012 +0300 @@ -0,0 +1,22 @@ + +================ + gavenkoa tips. +================ +.. contents:: + +About. +====== + +Make HTML version. +================== + +Install docutils package:: + + $ sudo apt-get install docutils-common # for Debian + +and build:: + + $ make html + $ sensible-browser tips-html/index.html + + diff -r 1ea412c9aefb -r 454edc8dfd18 benchmark.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmark.rst Mon May 07 00:16:23 2012 +0300 @@ -0,0 +1,22 @@ +.. -*- coding: utf-8; -*- + +============ + Benchmark. +============ +.. contents:: + +CPU. +==== + + http://www.cpubenchmark.net/ + +Video. +====== + + http://www.videocardbenchmark.net/ + +Hard drive. +=========== + + http://www.harddrivebenchmark.net/ + diff -r 1ea412c9aefb -r 454edc8dfd18 debian.rst --- a/debian.rst Mon May 07 00:06:23 2012 +0300 +++ b/debian.rst Mon May 07 00:16:23 2012 +0300 @@ -81,7 +81,7 @@ /dev/sda5 /mnt/music ntfs ro,nls=utf8,gid=win,dmask=222,fmask=337 0 0 /dev/sdd1 /mnt/usb vfat rw,shortname=winnt,utf8,quiet,gid=win,dmask=002,fmask=111 0 0 -Installing and configuting documentation. +Installing and configuring documentation. ========================================= Documentation packages end with ``-doc`` suffix. diff -r 1ea412c9aefb -r 454edc8dfd18 emacs.rst --- a/emacs.rst Mon May 07 00:06:23 2012 +0300 +++ b/emacs.rst Mon May 07 00:16:23 2012 +0300 @@ -22,10 +22,13 @@ Installing Emacs. ================= + http://ftp.gnu.org/gnu/emacs/windows/ - Clean GNU Emacs for 32-bit Windows + Clean GNU Emacs for 32-bit Windows. + http://alpha.gnu.org/gnu/emacs/windows/ + Official alpha build of GNU Emacs. http://emacsformacosx.com/ - Clean GNU Emacs for Mac OS X + Clean GNU Emacs for Mac OS X. Variables. ========== diff -r 1ea412c9aefb -r 454edc8dfd18 lang-comp.rst --- a/lang-comp.rst Mon May 07 00:06:23 2012 +0300 +++ b/lang-comp.rst Mon May 07 00:16:23 2012 +0300 @@ -41,3 +41,9 @@ http://www.ohloh.net/languages/compare User selected. +Lang cost. +========== + + http://archive.adaic.com/intro/ada-vs-c/cada_art.html + Comparing Development Costs of C and Ada + diff -r 1ea412c9aefb -r 454edc8dfd18 linux-driver.rst --- a/linux-driver.rst Mon May 07 00:06:23 2012 +0300 +++ b/linux-driver.rst Mon May 07 00:16:23 2012 +0300 @@ -21,6 +21,40 @@ * http://wiki.debian.org/GraphicsCard#nVidia * http://wiki.debian.org/NvidiaGraphicsDrivers +ATI free driver. +================ + + http://wiki.debian.org/AtiHowTo + Debian ATI howto. + +ATI/AMD proprietary driver. +=========================== + +To install driver under Debian run:: + + $ sudo apt-get install fglrx-driver + +To create simple ``xorg.conf`` file run:: + + $ sudo aticonfig --initial --input=/etc/X11/xorg.conf + +To check that driver was loaded properly:: + + $ fglrxinfo + display: :0 screen: 0 + OpenGL vendor string: Advanced Micro Devices, Inc. + OpenGL renderer string: AMD Radeon HD 6900 Series + OpenGL version string: 4.2.11566 Compatibility Profile Context + +Configure performance in Catalyst Control Center:: + + $ amdcccle + + http://wiki.debian.org/ATIProprietary + Debian ATI Proprietary Driver Howto + https://help.ubuntu.com/community/BinaryDriverHowto/ATI + Ubuntu AMD Binary Driver Howto + nouveau video driver. ===================== diff -r 1ea412c9aefb -r 454edc8dfd18 linux-wifi.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux-wifi.rst Mon May 07 00:16:23 2012 +0300 @@ -0,0 +1,16 @@ + +=================== + WiFi under linux. +=================== +.. contents:: + +Getting info about WiFi connection. +=================================== +:: + + $ /sbin/iwconfig + + http://wiki.debian.org/iwconfig + Debian wiki. + + diff -r 1ea412c9aefb -r 454edc8dfd18 linux.rst --- a/linux.rst Mon May 07 00:06:23 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ --*- mode: outline; coding: utf-8 -*- - -* SysRq. - - x86: ALT-SysRq- - SPARC: ALT-STOP- - PPC: ALT - Print Screen (or F13) - - - 'b' - reboot - 'p' - dump the current registers and flags to your console - 'r' - take control of keyboard back from X - 'e' - send SIGTERM to all processes, except for init - 'i' - send SIGKILL to all processes, except for init - 's' - attempt to sync all mounted filesystems - 'u' - remount all filesystems read-only - -You can put one of such line: - - $ echo 0 > /proc/sys/kernel/sysrq # disable - $ echo 1 > /proc/sys/kernel/sysrq # enable - -to your /etc/rc.local or alternativaly place under /etc/sysctl: - - kernel.sysrq = 1 - - http://www.kernel.org/doc/Documentation/sysrq.txt - Linux Magic System Request Key Hacks diff -r 1ea412c9aefb -r 454edc8dfd18 mail.rst --- a/mail.rst Mon May 07 00:06:23 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ --*- mode: outline; coding: utf-8; -*- - -* Message headers fields. - - from = "From:" mailbox-list CRLF - sender = "Sender:" mailbox CRLF - reply-to = "Reply-To:" address-list CRLF - - to = "To:" address-list CRLF - cc = "Cc:" address-list CRLF - bcc = "Bcc:" (address-list / [CFWS]) CRLF - newsgroups - - http://tools.ietf.org/rfc//rfc2076.txt - Common Internet Message Headers, Informational - http://tools.ietf.org/rfc/rfc2822.txt - Internet Message Format, Standard Track - http://tools.ietf.org/rfc/rfc2821.txt - Simple Mail Transfer Protocol, Standard Track - -* Sending email via gmail in emacs. - -; install starttls from here (no need for patch) -; http://josefsson.org/emacs-smtp-starttls.html - -(setq send-mail-function 'smtpmail-send-it - message-send-mail-function 'smtpmail-send-it - smtpmail-starttls-credentials - '(("smtp.gmail.com" 587 nil nil)) - smtpmail-auth-credentials - (expand-file-name "~/.authinfo") - smtpmail-default-smtp-server "smtp.gmail.com" - smtpmail-smtp-server "smtp.gmail.com" - smtpmail-smtp-service 587 - smtpmail-debug-info t - starttls-extra-arguments nil - smtpmail-warn-about-unknown-extensions t - starttls-use-gnutls nil) - -machine smtp.gmail.com login [your name]@gmail.com password [your password] - -And finally download, unzip, make and install startttls: - -http://josefsson.org/emacs-smtp-starttls.html - -See - - http://justinsboringpage.blogspot.com/2009/02/sending-email-via-gmail-in-emacs.html - http://obfuscatedcode.wordpress.com/2007/04/26/configuring-emacs-for-gmails-smtp - -* Mail etiquette. - -** Bottom vs. top quoting. - -Just not use top quoting! - -** Stallman warn about Google. - - http://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg00302.html - -* Storage format for email. - -** mbox. - - http://tools.ietf.org/html/rfc4155 - The application/mbox Media Type (Category: Informational) - http://en.wikipedia.org/wiki/Mbox - -** maildir. - - http://en.wikipedia.org/wiki/Maildir - -** MH mailbox format. - - http://en.wikipedia.org/wiki/MH_Message_Handling_System - diff -r 1ea412c9aefb -r 454edc8dfd18 media-type.rst --- a/media-type.rst Mon May 07 00:06:23 2012 +0300 +++ b/media-type.rst Mon May 07 00:16:23 2012 +0300 @@ -1,5 +1,20 @@ --*- mode: outline; coding: utf-8 -*- +.. -*- coding: utf-8 -*- -* List of media types. +============== + Media types. +============== +.. contents:: + +List of media types. +==================== http://en.wikipedia.org/wiki/Internet_media_type + +Determine video codec. +====================== +:: + + $ sudo apt-get install mediainfo mediainfo-gui + $ mediainfo $FILE + + diff -r 1ea412c9aefb -r 454edc8dfd18 web-search.rst --- a/web-search.rst Mon May 07 00:06:23 2012 +0300 +++ b/web-search.rst Mon May 07 00:16:23 2012 +0300 @@ -75,6 +75,14 @@ http://www.technorati.com/ Very irrelevant or zero result. +History of word/phrase occurrence. +================================== + + http://www.google.com/trends/ + How often something searched through Google. + http://books.google.com/ngrams + Search of phrases in books from 1800 till now day. + DuckDuckGo. =========== diff -r 1ea412c9aefb -r 454edc8dfd18 x.rst --- a/x.rst Mon May 07 00:06:23 2012 +0300 +++ b/x.rst Mon May 07 00:16:23 2012 +0300 @@ -76,6 +76,84 @@ $ xprop -root $ xprop -name bash # for xterm with running bash inside +Keyboard's keys under X window. +=============================== + + scancodes + hardware-dependent codes generated by keystrokes and received by + the X server. + keycodes + Codes sent by the X server to the client indicating which key + was pressed. Keycodes by themselves do not indicate what the + keystroke means; the client must request that information from + the X server. + modifiers + Flags, such as ``shift'' and ``control,'' that the server sends + with each keycode to the client. The client's interpretation of + the keycode may depend on the state of the modifiers. For + example, the state of the shift modifier determines whether an + alphabetic character should be lowercase or uppercase. Because + the X server encodes the states of the eight modifiers (shift, + lock, control, mod1, mod2, mod3, mod4, and mod5) in a single + byte of data, modifiers are often referred to as ``modifier + bits.'' + keysyms + codes that specify the glyphs appearing on the keys. The X + server also maintains a list of strings that describe the + keysyms, such as ``a'', ``B'', and ``Control.'' + +Find the keycode. +================= + +:: + + $ xev + $ cat /usr/include/X11/keysymdef.h + +Don't run under X:: + + $ showkey + +To do same under X:: + + $ xev | sed -n 's=.*keycode \([0-9]*\).*=\1=p' + +List key modifier:: + + $ xmodmap -pm + +Add keycode to modifier:: + + $ xmodmap -e "add shift = Shift_R" + +Remove keycode from modifier:: + + $ xmodmap -e "remove shift = Shift_L" + +Examining the current keymap table:: + + $ xmodmap -pk + +Changing the keymap table:: + + $ xmodmap -e "keycode 34 = bracketleft braceleft" + $ xmodmap -e "keysym CapsLock = Control_L" + + https://wiki.ubuntu.com/LaptopTesting/Keycodes + Ubuntu Keycodes howto. + http://en.gentoo-wiki.com/wiki/Multimedia_Keys + Gentoo Multimedia Keys howto. + +List input devices. +=================== +:: + + $ xinput -list + +You can use obtained ID in such command:: + + $ setxkbmap -device $ID -layout dvorak + Making screenshort. =================== :: diff -r 1ea412c9aefb -r 454edc8dfd18 xkb.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xkb.rst Mon May 07 00:16:23 2012 +0300 @@ -0,0 +1,24 @@ + +====== + xkb. +====== +.. contents:: + +List xkb settings. +================== +:: + + $ setxkbmap -query + rules: evdev + model: pc105 + layout: us,ru + variant: , + options: grp:rwin_toggle,grp_led:scroll + +Set en/ru layout. +================= + +Empty ``-option`` reset xkb settings:: + + $ setxkbmap -layout us,ru -option '' -option grp:rwin_toggle,grp_led:scroll +