Archive
rubygems-update issue on Ubuntu
rubygems-update issue on Ubuntu
If you have this problem on your computer:
sudo gem update --system Updating RubyGems Bulk updating Gem source index for: http://gems.rubyforge.org/ Updating rubygems-update ERROR: While executing gem ... (Gem::GemNotFoundException) could not find rubygems-update locally or in a repository
The problem is RubyGems you need to install manually or use this script solution:
#!/bin/bash #(download the latest on http://rubyforge.org/frs/?group_id=126) wget http://rubyforge.org/frs/download.php/43984/rubygems-update-1.3.0.gem sudo gem install rubygems-update-1.3.0.gem sudo update_rubygems # now this work: sudo gem update --system echo "done."
I found this solution on this web:
http://rubyglasses.blogspot.com/2008/08/updating-gem-to-120-on-ubuntu.html
qTranslate Tag Cloud Fixed
qTranslate Tag Cloud Fixed
If you have qTranslate plugin for wordpress and you have some issues on your tag cloud.
The problem was that the function that generated the tag cloud in spanish the size of the sources they put comma instead of point
On /wp-includes/category-template.php in function wp_generate_tag_cloud check the line 422, str_replace() fix the problem:
418 419 420 421 422 423 424 | foreach ( $counts as $tag => $count ) { $tag_id = $tag_ids[$tag]; $tag_link = clean_url($tag_links[$tag]); $a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . attribute_escape( sprintf( __ngettext('%d topic','%d topics',$count), $count ) ) . "'$rel style='font-size: " . str_replace(",",".",( $smallest + ( ($count - $min_count ) * $font_step ) )) . "$unit;'>$tag</a><!-- $font_step -->"; } |
Simple PHP Templates
Simple PHP Templates
This is my Template function:
$value) { $t=str_replace('{'.strtoupper($part).'}',$value,$t); } } return $t; } ?>
example.tpl:
{TITLE}
<div id="main">{MAIN}</div>
<div id="other">{OTHER}</div>other.tpl:
<form id="{FORM_NAME}" action="{SOME_PATH}"> <!-- etc... --> </form>
Using the function and templates:
Result:
Some Page <div id="main">Bla, Bla, Bla...</div> <div id="other"> <form id="frmLogin" action="login.php"> <!-- etc... --> </form></div>
Toshiba Fan On Ubuntu
Toshiba Fan On Ubuntu

You need to install toshset include on toshutils (do you have lm-sensors ?)
sudo apt-get install toshutils
This script make the fan run high, low or normal
#!/bin/bash case $1 in h) sudo toshset -fan 4 # high ;; n) sudo toshset -fan 5 # normal ;; l) sudo toshset -fan 6 # low ;; esac
If you live in warn places, “~$ script.sh h” could be help you a little don’t use all time this option, to normalize your fan run “~$script.sh n”.
There are other tools on toshset “man toshset”.
MySQL Workbench (Linux)
MySQL Workbench (Linux)
What is MySQL Workbench ?
MySQL Workbench is a cross-platform, visual database design tool developed by MySQL. It is the highly anticipated successor application of the DBDesigner4 project. MySQL Workbench will be available as a native GUI tool on Window, Linux and OS X.
For Ubuntu (8.04) users i made this install script (run as root):
#!/bin/bash # This script tested only on Ubuntu 8.04 (32 bits) # You need some extra libs to run MySQL Workbench sudo apt-get install liblua5.1-0 libzip1 libmysqlclient15off # Download MySQL Workbench Ubuntu 8.04 Bin Files wget -c ftp://ftp.mysql.com/pub/mysql/download/gui-tools/mysql-workbench-5.1.2-alpha-ubuntu8-i386.tar.gz # Download the md5 checksum file wget -c ftp://ftp.mysql.com/pub/mysql/download/gui-tools/mysql-workbench-5.1.2-alpha-ubuntu8-i386.tar.gz.md5 # Check md5sum real=`md5sum mysql-workbench-5.1.2-alpha-ubuntu8-i386.tar.gz | awk '{ print $1 }'` confirm=`cat mysql-workbench-5.1.2-alpha-ubuntu8-i386.tar.gz.md5 | awk '{ print $1 }'` if [ "$real" = "$confirm" ] then # Extract (/usr/local/bin/ /usr/local/lib/mysql-workbench/ /usr/local/share/mysql-workbench/) tar xvzf mysql-workbench-5.1.2-alpha-ubuntu8-i386.tar.gz -C / else echo "Wrong MD5, run the script again." fi
Note: MySQL Workbench is alpha on Linux
More information about MySQL Workbench
PunBB + Python = PynBB
PunBB + Python = PynBB
I made this Python script interface of PunBB forums
Download this script: [pynbb.py]
Edit this vars:
# BEGIN OF EDITABLE OPTIONS # ################################################################### HOST = "" # PunBB WebSite without http:// and slashes PATH = "" # Example: domain.com/forum PATH ="/forum" USER = "" # Your Username (Important: case sensitive) PASS = "" # Your Password ################################################################### # END OF EDITABLE OPTIONS #
Run:
python pynbb.py
Note: Does’t work when the forum uses clean urls (maybe in the next release)

Recent Comments