Search This Blog

Friday, May 25, 2018

a solution for ubuntu 12 sources mismatch

Found myself installing Ubuntu 12 for a little project, and out of the box, post installation, apt didn't work, with apt-get update failing with error messages regarding "sources mismatch". 
Sadly, sudo apt-get clean && sudo apt-get update didn't get things any better.
A little search brought me to an askubuntu discussion and solution (which in itself, was based on another discussion and solution by askubuntu member lorem). The solution is remarkably simple - delete all of apt lists, and start over: 

sudo rm -rf /var/lib/apt/lists/*sudo apt-get update

Thursday, May 24, 2018

howto import and export data from mysql using the command line interface

Found myself in need to quickly transfer data between mysql databases in different computers. 
searched the web and found a nice guide. As I don't usually work with mysql, and whenever mysql issues arise, they are usually in relation to time-stress issues, I thought summarizing the data, just in case, might be a good idea:
exporting from the source computer:
mysqldump -u [dbuser] -p [database-name] > /tmp/[dumpfilename]

Pay attention: you do not provide the password in the command. it will be asked for (assuming the user has a password) when the program runs. 

Now transfer the file to the target computer. 
and there - 
enter into mysql and create the database. 
(once inside  the mysql command interface, just issue  create database [database-name] 
then return to the command line  and issue:
mysql -u [dbuser] -p [database-name] < /tmp/[dumpfilename]
Once again - Pay attention: you do not provide the password in the command. it will be asked for (assuming the user has a password) when the program runs. 

a remark:
what you get is a lovely text file, with mysql commands that shall create the database content (tables and actual content). I did not export/import a very sophisticated db, so I still do not know the limitations of this transport method.  As usual, and as is especially important to remember the quick-and-dirty solutions, use the method with care, and be willing to spend time learning more and tackling surprising aspects that one might not expect, but that usually arise in database export/import processes. But it did work for me in a very simple db transfer. 


Sunday, May 20, 2018

Kindle Device Howto: What is my IP address?

Sometimes you look for donkeys and you find a monarchy instead. 

Doing a short network survey of my home network (which is surprisingly large, as all home networks are these days), I found myself looking for a way to verify that an unidentified device was indeed my Kindle PaperWhite. How can you see the IP Address of your kindle device ? 

A rather short search (but not as short as one would have expected) brought me to the MobileRead KindleTouch Hacking # Search Bar Shortcuts and was that a happy discovery or what? 

Now, I've naturally known that all Kindle devices are Linux-based smart-gadgets, of the pervasive computing class, but theoretically knowing that is one thing, and finding the keys for a comfortable and leisurely path to discoveries is an entirely different matter. 

Putting aside that discovery of how to get into the depths of one's kindle for a while, the mere hidden functionality that is accessible through the "Search Bar Shortcuts", is a goldmine in itself. 

But putting that trove aside, the search in question is answered easily: 
Click the Search Icon, and then enter the following 4 characters to get your WiFi information (don't miss the semi-colon): 
;711  
And you shall find what you have sought. 


Thursday, May 3, 2018

reinstall vmware tools greyed out ?

 Do you see that the reinstall vmware tools option is greyed out on your vmware guest machine ? 
shortest way to fix, for a linux guest, on a windows host, was -  
  1. create dvd/cd 
  2. set it to mount the relevant guest additions -
    C:\Program Files (x86)\VMware\VMware Workstation\linux.iso
    #Stressing again, this path was relevant for a windows host and a linux guest. 
  3. now boot up.
    note: This can be done with guest up or down, but i prefer, considering possible client distress, do to it "properly" with client down and being rebooted after hardware connected... it appears to be NOT NECESSARY for most modern clients) 


now you can install guest addition in your preferred way. 
my way: 
1) mkdir /tmp/1
2) sudo mount /dev/sr0 /tmp/1
3) mkdir /tmp/2
4) cd /tmp/2
5) tar xvf ../1/VMWareTools-xxx-version-number-xxx.tar.gz 
6) cd vmware-tools-distrib 
7) sudo ./vmware-install.pl --default 

now be sure to set your preferred guest addition prefernces (shared folders, copy&paste, etc)