Archive for the 'bash' Category

11
Nov

two useful scripts

      - Use pgbench to benchmark a postgresql database
      - “-m 1″ show sharedmem, “-m N” set sharedmem to N mb
      - “-a” to help or just edit the first lines to configure it.

      - Use mencoder/mplayer to add a subtitle file into a video file or to reencode it in other format.
      - “-h” to help or edit the first lines to configure.

        Enjoy :)

    24
    Aug

    Recursos2, gentoo-devmeeting and other meetings

    I made a ebuild for Recursos2, now you can emerge (~x86) it easily and follow the instruction in the ebuild (really it must work in any distro).

    Recursos2 is a bash script that use several system commands (sed, grep, awk, etc) to extract info about your system (cpu, mem, bandwithd, etc). This info can be reported in “raw” mode (nice to create an rrd database), text mode (nice to email it) and in html mode.

    Optionally use rrd and imagemagick to create nice use graphs. It is very flexible and works nice in any arch inclusive in embedded systems.

    In other Hand we are seachign new dates for a gentoo-devmeeting maybe in Jaunary :)

    So meanwhile for spanish public i have a talk about Gentoo in the Barcelona’s LUG (15-17 September) and other gentoo Devs will stay there too.

    18
    Jul

    New localepurge option, cherokee version and.. Gentoopalooza!

    A new pretend mode and regex support is now in localepurge-0.5.2 using this patch so enjoy :). I upload also the new version of cherokee to portage. See changeLog for version 0.5.4 here.

    In other hand we are trying to have anice devs & users meeting in Seville, so stay tuned, some european devs and USA devs will come to have talks and enjoy :)

    regards

    27
    Dec

    How to use “localepurge”

    A few users have some problems with app-admin/localepurge so i will xplain how o t use it :)

    Actually you can use 2 versions. 0.4 version is considered stable and 0.5 is masked because it add a new feature, the multidir search. Use both by your own risk.

  • Install it :
  • # emerge app-admin/localepurge
  • Configure :
  • You just need to uncomment the features you want to use, and add the locales you want to keep in your system.

    # vi /etc/locale.nopurge
  • Tip : get a list of locales.
  • # less /var/cache/localepurge/localelist
  • Execute localepurge :
  • # localepurge

    You can use a few options in command line:

  • -help,-h : Help!.
  • -version : Version.
  • -debug,-d : Debug.
  • -nocolor,-nc : Disable color output.
  • -verbose,-v : Verbose output (recomended).
  • And some options in the config file:

  • MANDELETE : Purge man pages too.
  • SHOWFREEDSPACE : Show freede space.
  • VERBOSE : Verbose output.
  • NOCOLOR : Disable color output.
  • enjoy :)

    27
    Dec

    New version of localepurge

    I just released a new version of app-admin/localepurge. More locales supported and now colorized!!!

    A testing version is just released too :)
    Version 0.5 add support for multiple directories so test it and tell me.

    28
    Nov

    ebookmerge

    So long time without post :)

    Last night i uploaded a new version(0.9) of ebookmerge to portage. Ebookmerge is a tool for manage ebooks in gentoo per user. All app-doc/ebooks-* has been masked pending removal.
    With ebookmerge you can:

  • Retrieve an update listdirectly from the lidn web:
  • bass@bebop ~ $ ebookmerge.sh -r
    * Dowloading list from http://lidn.sf.net…
    * Dowloaded. Use -l for a list.
    bass@bebop ~ $
  • You can search:
  • bass@bebop ~ $ ebookmerge.sh -s sed
    * Results for sed :
    sed-3.02.tgz
    bass@bebop ~ $
  • Show the list of aviable and installed ebooks:
  • bass@bebop ~ $ ebookmerge.sh -l
  • Download an ebook to current directory:
  • bass@bebop ~ $ ebookmerge.sh -d sed-3.02
    * Dowloading eBook sed-3.02 in /home/bass…
    * Dowloaded.
    bass@bebop ~ $
  • Emerge the ebook. It download the ebook and install it in DevHelp repository (you need devhelp >=0.10)
  • bass@bebop ~ $ ebookmerge.sh -e textutils-2.0.tgz
    * Dowloading eBook in /tmp/tmp.bo2pCv…
    * Dowloaded.
    * Preparing to install /tmp/tmp.bo2pCv/textutils-2.0.tgz in DevHelp…
    * unpacking /tmp/tmp.bo2pCv/textutils-2.0.tgz…
    * /tmp/tmp.bo2pCv/textutils-2.0.tgz installed in DevHelp :-)
    bass@bebop ~ $
  • Uninstall an ebook:
  • bass@bebop ~ $ ebookmerge.sh -u sed-3.02
    * sed-3.02 will be deleted in 5 seconds….
    * sed-3.02 was deleted.
    bass@bebop ~ $
  • And of course the help:
  • bass@bebop ~ $ ebookmerge.sh -h
    eBook downloader for Gentoo Linux [ v 0.9 ]
    by bass@gentoo.org* Usage: ebookmerge.sh options (-hlrid)-l : list aviable eBooks and installed eBooks.
    -r : retrieve/refresh eBooks list.
    -d NAME : download eBook.
    -i NAME : install eBook previously dowloaded to devhelp.
    -u NAME : uninstall eBook. Don’t use confirmation.
    -e NAME : emerge an eBook.
    -s EXPR : search eBook.
    -c : disable color.
    -h : show this help.

    * To download and insatll an Ebook :
    * ebookmerge.sh -e bashref-2.05a.tgz or other eBook name.

    * This script actually doesn’t works with relative paths.
    bass@bebop ~ $

    It’s more easy to mantain this script that a lot of lil ebuilds and an eclass…
    Any bug or sugest please mail me or bug.gentoo.org.

    In other hand, my picts fo the USA trip are in my gallery




    del.icio.us

    Flickr Photos

    IMG_2621.JPG

    IMG_2620.JPG

    IMG_2619.JPG

    More Photos