Volodymyr Kononenko's Personal Web Site

Updated PairTagHighlighter plugin for Geany 1.24

Hi all,

For all of users who is affected by issue with PairTagHighlighter - the issue is fixed.
In order not to wait next official Geany plugins release, I've prepared 64bit version of plugin for Linux - pairtaghighlighter.so
Put downloaded shared library to /usr/lib/x86_64-linux-gnu/geany/ or /usr/local/lib/geany/ and enable with Geany Plugin Manager.

Thanks Nikita, JLamp07, ricardoabarza and guys from linux.org.ru for reporting and Colomban Wendling for help with the fix!

2015-03-09 21:24 · Volodymyr M. Kononenko · 0 Comments

OpenWRT: TP-LINK TL-WDR3600 Wi-Fi On/Off Switch Button

TP-LINK TL-WDR3600 has a very usefull hardware switch button, which allows to turn on/off wi-fi. But OpenWRT does not support this feature out of the box (corresponding ticket).

Here is a method how to enable it.

1. Create script (e.g. /root/bin/wifi_on_off.sh) with the following content:

HW_SWITCH_STATE=$(cat /sys/kernel/debug/gpio | grep gpio-17 | awk '{print $6}')
UCI_WIFI_DISABLED=$(uci get wireless.@wifi-device[0].disabled)
if [ "lo" == ${HW_SWITCH_STATE} ]; then
elif [ "hi" == ${HW_SWITCH_STATE} ]; then
    exit 1
    uci set wireless.@wifi-device[0].disabled=${HW_SWITCH_STATE}
    uci commit wireless

2. Add exec permissions to the script and create cron job:

*/1    *    *    *    *        /root/bin/wifi_on_off.sh 2>&1 >/dev/null

3. Enable cron autostart and start it:

/etc/init.d/cron enable
/etc/init.d/cron start

Note: Disadvantage of this method is that switching the button will not react immediately, but with maximum 1 minute delay in the worth case.

2013-11-18 21:28 · Volodymyr M. Kononenko · 0 Comments

My .vimrc

Just not to lose my .vimrc configuration posting it here.

execute pathogen#infect()
syntax on
filetype plugin indent on
" Statusline
set nocompatible ruler laststatus=2 showcmd showmode number
set background=dark
" Show line numbers
set number
" Mark tabs and trailing spaces
set list listchars=nbsp:·,tab:→\ ,trail:·,extends:>,precedes:<
" Remove useless splash screen
set shortmess+=I
" Indentation
set smartindent tabstop=4 shiftwidth=4 expandtab
" Search
set incsearch ignorecase smartcase hlsearch
" Scroll the window so we can always see 10 lines around the cursor
set scrolloff=10
" Show a vertical line on a 80th character
set textwidth=80
set colorcolumn=+1
highlight ColorColumn ctermbg=DarkGrey
" Start NERDTree with F2 key
map <F2> :NERDTreeToggle<CR>
" NERDTree window width
let g:NERDTreeWinSize = 60
" cscope find function definition
nmap <c-f> :cs find g <c-r>=expand("<cword>")<cr><cr>

2013-07-26 10:38 · Volodymyr M. Kononenko · 0 Comments

(UPDATED) PairTagHighlighter plugin version 1.1 for Geany 1.23

PairTagHighlighter will be available with Geany 1.24. For those, who wants to use it right now, download compiled plugin for 64bit arch here (the link contains updated version of plugin - 1.1): pairtaghighlighter.so.
Put it to /usr/lib/x86_64-linux-gnu/geany and enable with Geany Plugin Manager.

Changes are available in ChangeLog.

Thanks to all, who made suggestions and thanks Peter Donin for important bugreport.
Any comments and suggestions are welcome! Maybe I will have time to implement them before Geany 1.24 release. Post them in comments to this post.

2013-06-06 11:20 · Volodymyr M. Kononenko · 34 Comments

Vim + cscope + NERD Tree

1. Create needed directories for vim in your home:

mkdir ~/.vim
cd ~/.vim
mkdir bundle

2. Install pathogen for easy installing further vim plugins:

cd ~/.vim
mkdir ~/.vim/autoload
curl -Sso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim

3. Install NERD Tree vim plugin:

cd ~/.vim/bundle
git clone https://github.com/scrooloose/nerdtree.git

4. Go to your project dir:

cd /path/to/project/dir

5. Create cscope.files list for further generating cscope database. For example:

find . -name "*.java" -or -name "*.c" -or -name "*.cpp" -or -name "*.h" > cscope.files

6. Generate the Cscope database (full doc):

cscope -b -q

7. Download cscope_maps.vim to the vim plugin directory:

cd ~/.vim/plugin
wget http://cscope.sourceforge.net/cscope_maps.vim

8. Optionally you may add key mapping to the .vimrc file. For example:

nmap <c-f> :cs find g <c-r>=expand("<cword>")<cr><cr>

Now just press Ctrl+F on the function call to see its definition(s).

Note: possibly you will need to run vim in your project dir and execute “ :cs add cscope.out” for adding cscope database.

Setting NERDTree width

To set NERDTree file browser width, just add the following line to teh .vimrc:

let g:NERDTreeWinSize = 60

where 60 is width value. Change it as you like.

2013-02-26 09:20 · Volodymyr M. Kononenko · 0 Comments

Adding Ubuntu Installation to MIMB USB (Grub4dos config)

How to install Ubuntu from USB stick? You may use MIMB USB for it. This post describes steps.

  1. Download necessary USB ISO distribution.
  2. Put it to appropriate path on MIMB USB stick (/boot/Install/Ubuntu/amd64/ubuntu-12.04.1-desktop-amd64.iso in this example).
  3. Add an entry to grub4dos menu:
    title Ubuntu 12.04 amd64
    find --set-root /boot/Install/Ubuntu/amd64/ubuntu-12.04.1-desktop-amd64.iso
    map /boot/Install/Ubuntu/amd64/ubuntu-12.04.1-desktop-amd64.iso (0xff) || map --mem /boot/Install/Ubuntu/amd64/ubuntu-12.04.1-desktop-amd64.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/preseed/ubuntu.seed boot=casper iso-scan/filename=/boot/Install/Ubuntu/amd64/ubuntu-12.04.1-desktop-amd64.iso splash quiet --
    initrd /casper/initrd.lz

Note: Installation has been tested on Ubuntu 12.04 LTS.

2013-02-10 16:38 · Volodymyr M. Kononenko · 0 Comments

Adding Fedora Installation to MIMB Menu (Grub4dos config)

How to install Fedora from USB? You may use MIMB USB for it.

  1. Download necessary Fedora ISO distribution.
  2. Mount it as a loop device:
    mount -o loop /path/to/img.iso /path/to/mount/point
  3. Copy the directory /path/to/mount/point/LiveOS to the root of MIMB USB drive.
  4. Copy files initrd0.img and vmlinuz0 from /path/to/mount/point/isolinux to some path of MIMB, e.g. boot/Install/Fedora/x86_64.
  5. Add an entry to grub4dos menu:
    title Fedora 17 x86_64 XFCE 
    kernel /boot/Install/Fedora/x86_64/vmlinuz0 root=live:UUID=<UUID_value> rootfstype=vfat ro liveimg quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 
  6. Change <UUID_value> to the UUID of your MIMB USB drive.
2012-08-31 19:34 · Volodymyr M. Kononenko · 2 Comments

Microsoft Fixit Tool

Today I have met a very strange problem: I've accidentally installed Intel Pro Set Bluetooth driver instead of Atheros' one. They are on the same download page for HP ProBook 4370s family, so it was not hard to make mistake. When I started removing Intel Pro Set driver, I was getting error. The software required to check, if the device is properly connected before removing.

The software removal you are attempting cannot 
proceed. To remove this software, please first be sure
that Intel(R) wireless adapter is correctly installed 
and enabled.

But thereis no Intel Bluetooth device on the laptop, so connecting is impossible.
I have found very nice solution - Microsoft Fixit, which helped me.

2012-08-17 18:29 · Volodymyr M. Kononenko · 0 Comments

Geany and geany-plugins standalone installation

In order to build geany and geany-plugins of a particular version and to install them without affecting local system there is a possibility to make a standalone installation.

To build Geany:

export GEANY_INSTALL_DIR=/path/to/dir
./configure --prefix=${GEANY_INSTALL_DIR}
make && make install

To build Geany plugins:

export PKG_CONFIG_PATH=${GEANY_INSTALL_DIR}/lib/pkgconfig
./configure --prefix ${GEANY_INSTALL_DIR} --with-geany-libdir=${GEANY_INSTALL_DIR}/lib

in order to build single plugin, e.g. pairtaghighligher:

./configure --disable-all-plugins --enable-pairtaghighlighter --prefix=${GEANY_INSTALL_DIR} --with-geany-libdir=/${GEANY_INSTALL_DIR}/lib
2016-03-12 15:30 · Volodymyr M. Kononenko · 0 Comments

MIMB Menu Files Are Published on Github

I decided to move them to Github for two reasons: suitable version control and suitable access to examples for those, who wants to create own MIMB USB.
Github repo is here.

2013-05-31 19:38 · Volodymyr M. Kononenko · 0 Comments

Epiphany 2013

It is the second time we spend this day together with Father in full. Thanks to him for the organisation and for the company. Also thanks to my Mother, wife and cousin, who was a part of the company today!

2013-01-19 19:35 · Volodymyr M. Kononenko · 2 Comments

Introducing Notes


I am happy to announce a new section of my site - Notes.

Very often we need to look through several pages of forum to find appropriate solution. Sometimes we write useful scripts of long commands with multiple pipes etc. Notes is a place to store a brief tips, links, scripts, solutions, which are result of practice and experience.

It is my second attempt to organize my notes. The first one was also powered by dokuwiki, but not public, and as a result they were not designed well and comfortably classified. Then I closed them and only backup left. I felt that I need such notes and decided to make them public. I hope they will help somebody besides me not to waste time.

2012-10-07 18:30 · Volodymyr M. Kononenko · 0 Comments

How I Cleaned Laptop Keyboard

2012-09-15 20:01 · Volodymyr M. Kononenko · 0 Comments

Bash Prompt

I started using zsh, but I will post my PS1 not to lose, because I like it.

Root prompt

PS1="\[\033[1;31m\][\[\033[0;31m\]\u\[\033[0;37m\]@\[\033[0;31m\]\h\[\033[1;31m\]] \[\033[0;37m\]\W \[\033[1;31m\]\$\[\033[0m\] "

User prompt

PS1="\[\033[1;32m\][\[\033[0;32m\]\u\[\033[0;37m\]@\[\033[0;32m\]\h\[\033[1;32m\]] \[\033[0;37m\]\W \[\033[1;32m\]\$\[\033[0m\] "

Nice prompt, suggested in comments. Posting it here. Thanks Anderson :-)

PS1="[\[$txtgrn\]\u\[$txtrst\]\[$bldblu\]@\[$txtrst\]\[$txtcyn\]\h\[$txtrst\] \[$bldblu\]\w\[$txtrst\]]\$ "
2012-09-09 12:54 · Volodymyr M. Kononenko · 3 Comments

Page Tools

Development and Design by Volodymyr Kononenko
Powered by DokuWiki