Download and install VirtualBox from website.
Download and install VirtualBox extensions (matching your VirtualBox version) from website.
# yum -y install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
# reboot
# /etc/init.d/vboxdrv setup
2013/11/06
2013/07/16
Reset root password for MySQL
1. find binary (mysqld)
2. launch it with options --skip-grant-tables --skip-networking
3. connect to mysql
4. change pass
For example, on Debian:
service mysql stop
mysqld --skip-grant-tables --skip-networking &
> [1] 12192
mysql -u root -e <<EOSQL "UPDATE mysql.user SET Password=PASSWORD('temp123') WHERE User='root'; FLUSH PRIVILEGES;"
EOSQL
kill -9 12192
service mysql stop
service mysql start
sleep 5
service mysql restart
2. launch it with options --skip-grant-tables --skip-networking
3. connect to mysql
4. change pass
For example, on Debian:
service mysql stop
mysqld --skip-grant-tables --skip-networking &
> [1] 12192
mysql -u root -e <<EOSQL "UPDATE mysql.user SET Password=PASSWORD('temp123') WHERE User='root'; FLUSH PRIVILEGES;"
EOSQL
kill -9 12192
service mysql stop
service mysql start
sleep 5
service mysql restart
2013/07/10
Bufexplorer patch (shorter buffer names)
Buffer Explorer Version 7.3.5 (http://www.vim.org/scripts/download_script.php?src_id=19481):
463,466c463,466
< syn match bufExplorerModBuf /^\s*\d\+.\{4}+.*/
< syn match bufExplorerLockedBuf /^\s*\d\+.\{3}[\-=].*/
< syn match bufExplorerHidBuf /^\s*\d\+.\{2}h.*/
< syn match bufExplorerActBuf /^\s*\d\+.\{2}a.*/
---
> syn match bufExplorerModBuf /^\s*\d\+.\{3}+.*/
> syn match bufExplorerLockedBuf /^\s*\d\+.\{2}[\-=].*/
> syn match bufExplorerHidBuf /^\s*\d\+.\{1}h.*/
> syn match bufExplorerActBuf /^\s*\d\+.\{1}a.*/
667c667,675
< let line = buf.attributes." "
---
> let line = buf.attributes
> " remove unnecessary symbols ('#', ' ') in buffer attributes
> let line = substitute(line, '[# ]', '', 'g').' '
> " keep unchanged buffers aligned with changed ones
> if line !~ '+'
> let line .= ' '
> endif
> " restore space right after buffer number
> let line = substitute(line, '\([0-9]\+\)', '\1 ', '')
463,466c463,466
< syn match bufExplorerModBuf /^\s*\d\+.\{4}+.*/
< syn match bufExplorerLockedBuf /^\s*\d\+.\{3}[\-=].*/
< syn match bufExplorerHidBuf /^\s*\d\+.\{2}h.*/
< syn match bufExplorerActBuf /^\s*\d\+.\{2}a.*/
---
> syn match bufExplorerModBuf /^\s*\d\+.\{3}+.*/
> syn match bufExplorerLockedBuf /^\s*\d\+.\{2}[\-=].*/
> syn match bufExplorerHidBuf /^\s*\d\+.\{1}h.*/
> syn match bufExplorerActBuf /^\s*\d\+.\{1}a.*/
667c667,675
< let line = buf.attributes." "
---
> let line = buf.attributes
> " remove unnecessary symbols ('#', ' ') in buffer attributes
> let line = substitute(line, '[# ]', '', 'g').' '
> " keep unchanged buffers aligned with changed ones
> if line !~ '+'
> let line .= ' '
> endif
> " restore space right after buffer number
> let line = substitute(line, '\([0-9]\+\)', '\1 ', '')
2013/06/20
2013/06/04
Permissions fix
find . -type d -exec chmod 755 \{\} \;
find . -type f -exec chmod 644 \{\} \;
find . -regex '.*pl$\|.*php$' -exec chmod 755 \{\} \;
find . -type f -exec chmod 644 \{\} \;
find . -regex '.*pl$\|.*php$' -exec chmod 755 \{\} \;
2013/03/18
2013/02/21
Markdown in Vim
Download "mkd.vim" from:
http://www.vim.org/scripts/script.php?script_id=1242
To .vim/syntax
Put in .vimrc:
au BufRead,BufNewFile *.md set filetype=mkd
http://www.vim.org/scripts/script.php?script_id=1242
To .vim/syntax
Put in .vimrc:
au BufRead,BufNewFile *.md set filetype=mkd
Subscribe to:
Posts (Atom)