wilhelms reset mysql passwd script

Filed under: logging — jj at 1:27 pm on Monday, August 28, 2006

from the gentoo forums thread:

http://forums.gentoo.org/viewtopic.php?t=153453

i found it, liked id (cf ‘plain text’: use chmod dude), today i searched for it again. thats why i copied it to this blog now. very handy little skript that does no harm if you know how to use it:)

#!/bin/bash
#
# resetRootPass script
#
# Recover lost root password of mysql database.
#
# By Willem Bermon
#

echo
echo “Mysql password recovery utility”
echo

# Stop the mysql server
/etc/init.d/mysql stop
/etc/init.d/mysql zap > /dev/null
/bin/killall mysqld > /dev/null

# Run mysqld in permissionless mode
/sbin/start-stop-daemon –start –quiet –exec /usr/bin/mysqld_safe \
–background — –skip-grant-tables >/dev/null 2>&1

sleep 1

# Execute queries
mysql -u root mysql -e “UPDATE user SET Password=PASSWORD(‘$1′) WHERE \
user=’root’; \
FLUSH PRIVILEGES;”
if [[ $? -eq 0 ]]
then
echo ” ** SQL root password updated”
else
echo ” ** SQL root password update unsuccesful”
fi

# Restart the mysql server
/bin/killall mysqld > /dev/null
/etc/init.d/mysql start

echo “Succesfully updated password!!”
echo
echo
exit 0

my screenrc

Filed under: logging — jj at 12:43 am on Saturday, August 26, 2006

# detach on hangup
autodetach on
startup_message off
defscrollback 5000
caption always “%{rw}%n%f %t %{wk} | %?%-Lw%?%{wb}[%n*%f %t]%?(%u)%?%{wk}%?%+Lw%? %{wk}”
vbell off

lock windows workstations

Filed under: logging — jj at 4:34 pm on Wednesday, August 23, 2006

create a shortcut to

rundll32.exe user32.dll,LockWorkStation

my vimrc (for now)

Filed under: linux, logging — jj at 11:33 pm on Tuesday, August 22, 2006

"this is work in progress
"set expandtab
set tabstop=4
set ts=4
set sw=4
set ruler
set rulerformat=%15(%F\ %c%V\ %p%%%)
set laststatus=2        "always a status line
syntax on

set   backupdir=~/vimbackup-files,/tmp
set   directory=~/vimbackup-files,/tmp 

"set statusline=%F%t
set statusline=%([%F\ %M%R%H]%)%<%=%y\ line\ %l\ of\ %L\ %p%%
"set statusline=%([%F\ %M%R%H]%)%<%=%y\ line\ %l\ of\ %L\ %p%%\ column\ %c
"set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
"set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
"set statusline=%<%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b'
set showmode

" wrap long lines but don't break words
set wrap
"set linebreak
set brk=\ \
"set mouse=a             " use the mouse

" EDITING OPTIONS
" set ai " autoindent
set autoindent              " keep indenting at same level
set noerrorbells visualbell     " flash screen instead of ringing bell
set esckeys             " allow arrow keys in insert mode
set showmatch               " show matching brackets
"set ignorecase              " make searches case-insensitive
set dictionary=/usr/share/dict/words    " get words from system dictionary

map  :tabnext
map  :tabprevious
map  :tabnext
map  :tabnext
map  :tabprevious
map  :tabnext
map  :tabnext
map  :tabprevious
imap  :tabnext
imap  :tabprevious

" F11 para esconder/mostrar comentários
"
fu! CommOnOff()
        if !exists('g:hiddcomm')
                let g:hiddcomm=1 | hi Comment ctermfg=black guifg=black
        else
                unlet g:hiddcomm | hi Comment ctermfg=lightred  guifg=cyan term=bold
        endif
endfu

" a triple toggle: toggle between:
" -comments are normal black
" -comments are red and bold
" -comments are white like my terms background (if you have a different term
"  backgreound you can still change the colors right here...

fu! CommOnRedOff()
        if !exists('g:hidcom')
                let g:hidcom = 1 | hi Comment ctermfg=black guifg=black
        elseif g:hidcom == 1
                let g:hidcom=2 | hi Comment ctermfg=lightred guifg=lightred term=bold
        else
                unlet g:hidcom | hi Comment ctermfg=white
        endif
endfu

" toggle line numbers on and off
fu! LineNumOnOff()
        if !exists('g:hiddLN')
                let g:hiddLN=1 | set nu
        else
                unlet g:hiddLN | set nonu
        endif
endfu

" toggle wrap on and off
fu! WrapOnOff()
        if !exists('g:WrapOO')
                let g:WrapOO=1 | set wrap
        else
                unlet g:WrapOO | set nowrap
        endif
endfu
" opens a new tab and gives a list of files to open
" one could use a custom environment variable together
" with a function to set it. would obsolete NewTabAndCustomFileBrowser

fu! NewTabAndFileBrowser()
   tabnew | browse split $HOME | only
endfu

fu! NewTabAndCustomFileBrowser()
   tabnew | browse split /home/jj/www/ajjax/xml | only
endfu

fu! SetCustomEnvDir()
        setg MRXVT_CUSTOM_ENVVAR=a:000[0]
        echo MRXVT_CUSTOM_ENVVAR . ' << new env'
endfu

fu! CustomFileBrowser()
   "browse split /home/jj/www/ajjax/xml | only
   "browse split $MRXVT_CUSTOM_ENVVAR | only
   browse split /data/www/test/hev/typo | only
endfu
fu! CustomFileBrowser2()
   "browse split /home/jj/www/ajjax/xml | only
   "browse split $MRXVT_CUSTOM_ENVVAR | only
   browse split /data/www/test/hev/typo/svn/ext | only
endfu
fu! CustomFileBrowser3()
   "browse split /home/jj/www/ajjax/xml | only
   "browse split $MRXVT_CUSTOM_ENVVAR | only
   browse split /data/www/hev/typo3conf/ext | only
endfu
fu! CustomFileBrowser4()
   call browsedir('bd', {pwd})
   browse e | only
endfu

fu! EatCarotM()
        :%s/^M$//g
        :%s/^M/ /g
endfu

map  :w
map  :call NewTabAndFileBrowser()
"map  :call CustomFileBrowser()
map  /function/{zf%
map  :tabmove
"map  :call CustomFileBrowser3()
map  :w
"map  :call Dddt3()
map  /\$vlwhyodebug(pa,'pa tabnew edit '.__FILE__.' +'.__LINE__);/thiststringdoesnotexist1sd3s3sdadfaddddumbhighlihtnice
map  yodebug(pa,'pa tabnew edit '.__FILE__.' +'.__LINE__);/thiststringdoesnotexist1sd3s3sdadfaddddumbhighlihtnice
"map  v  wlyp
"map  :call CustomFileBrowser4()
"map  :browse e
"map  :call browsedir("name", "buffer")
map  :call LineNumOnOff()
"map  :call NewTabAndCustomFileBrowser()
"map  :!touch /data/www/hev/

"map  :set nowrap
map  :call WrapOnOff()
imap  :call WrapOnOff()
map  :call CommOnRedOff()
map  :tabnew 

" mappings that work only in insert mode
" F1 saves and goes back to insert mode
" F3 and 4 are word completion and (very nice) "go on with whatever follows
" the matching word"
"
imap  :w
imap  
imap  

map  :tabprevious
map  :tabnext
imap  :tabprevious
imap  :tabnext

map  :Tabprevious
map  :set syntax=typoscript

grep oto

Filed under: linux, logging — jj at 11:53 pm on Wednesday, August 16, 2006

gerade bei google image search, um die zur jrjr index datei abgewandelte apache platzhalterseite wieder aufzupolieren nachdem ich apt-get remove apache machte weil ich doch ein eigenen habe. wollte mir dieses debian-gnu, die apachefeder, und den debian-strudel wieder besorgen. und was fand ich da?

jj@vs:icons$ strings openlogo-25.jpg |grep oto
Photoshop 3.0

na, das duerfte inzwischen verjaehrt sein oder? aber irgendwie doch tainted fuer so ein gnu logo. hab dann auf den strudel verzichtet.

Next Page »