I needed to add to a wordpress based website Google maps location pictures with Google Maps Zoom In / Out controls.
I've seen plenty of plugins available that said to to this but none of them really worked fine for me. Either the plugins I checked in wordperss.org was too complex to set up and required a Google API registration or was marked as Broken (not working).
Finally to add the geographic locations taken from maps.google.com I used the embed code generated directly from maps.google.com.
But that was not the end of my WordPress Google Maps struggles. What followed was rather ridiculous, it seems since some time Google removed the pinning of a location searched for. Moreover the easy old way to simply pin a location on the map is also, gone.
Hence here is what I had to do to pinpoint location on the Google map of my searched country destination:
1. To be able to pinpoint the location, I had to login to my gmail 2. Go to http://maps.google.com in browser 3. Press on My Places button 4. Click on Create map and fill in the Title and Description dialogs 5. The Privacy and Sharing radio button should be selected 6. Click on Done and Save buttons 7. From the left top corner inside the Google map image to select the baloon picture (Add a Placemark) 8. Choose the exact desired placemark type and color from the next appearing dialog 9. Choose the location I want to pin on the map
I've created also a small Video tutorial just for fun for all those who want to see the pin a location with a baloon 😉 on the google map tutorial, here is the video as well:
For all people who can't properly see the .mov video here is link to the video created with recordmydesktop on my Linux showing how the baloon pinning inside a map can be done.
There is a nice site in Bulgarian explaining quite extensively how to add Bulgarian phonetic key set on Injinera’s Website. Another way to solve the problem is to use bgphon_xp program.
Have you ever been in need to execute some commands scheduled via a crontab, every let’s say 5 seconds?, naturally this is not possible with crontab, however adding a small shell script to loop and execute a command or commands every 5 seconds and setting it up to execute once in a minute through crontab makes this possible. Here is an example shell script that does execute commands every 5 seconds:
#!/bin/bash command1_to_exec='/bin/ls';
command2_to_exec='/bin/pwd';
for i in $(echo 1 2 3 4 5 6 7 8 9 10 11); do
sleep 5;
$command1_to_exec; $command2_to_exec;
done
This script will issue a sleep every 5 seconds and execute the two commands defined as $command1_to_exec and $command2_to_exec
The script can easily be modified to execute on any seconds interval delay, the record to put on cron to use with this script should look something like:
Where of course /path/to/exec_every_5_secs_cmds.sh needs to be modified to a proper script name and path location.
Another way to do the on a number of seconds program / command schedule without using cron at all is setting up an endless loop to run/refresh via /etc/inittab with a number of predefined commands inside. An example endless loop script to run via inittab would look something like:
while [ 1 ]; do
/bin/ls
sleep 5;
done
To run the above sample never ending script using inittab, one needs to add to the end of inittab, some line like:
mine:234:respawn:/path/to/script_name.sh
A quick way to add the line from consone would be with echo:
Then to load up the newly added inittab line, inittab needs to be reloaded with cmd:
# init q
I've also red, some other methods suggested to run programs on a periodic seconds basis using just cron, what I found in stackoverflow.com's as a thread proposed as a solution is:
I have few servers, which have automatically enabled IPv6 protocols (IPv6 gets automatically enabled on Debian), as well as on most latest Linux distribituions nowdays.
Disabling IPv6 network protocol on Linux if not used has 2 reasons:
1. Security (It’s well known security practice to disable anything not used on a server) Besides that IPv6 has been known for few criticil security vulnerabilities, which has historically affected the Linux kernel. 2. Performance (Sometimes disabling IPv6 could have positive impact on IPv4 especially on heavy traffic network servers). I’ve red people claiming disabling IPv6 improves the DNS performance, however since this is not rumors and did not check it personally I cannot positively confirm this.
Disabling IPv6 on all GNU / Linuces can be achieved by changing the kernel sysctl settings net.ipv6.conf.all.disable_ipv6 by default net.ipv6.conf.all.disable_ipv6 equals 1 which means IPv6 is enabled, hence to disable IPv6 I issued:
server:~# sysctl net.ipv6.conf.all.disable_ipv6=0
To set it permanently on system boot I put the setting also in /etc/sysctl.conf :
The aforedescribed methods should be working on most Linux kernels version > 2.6.27 in that number it should work 100% on recent versions of Fedora, CentOS, Debian and Ubuntu.
To disable IPv6 protocol on Debian Lenny its necessery to blackist the ipv6 module in /etc/modprobe.d/blacklist by issuing:
On Fedora / CentOS there is a another universal “Redhat” way disable IPv6.
On them disabling IPv6 is done by editting /etc/sysconfig/network and adding:
NETWORKING_IPV6=no
IPV6INIT=no
I would be happy to hear how people achieved disabling the IPv6, since on earlier and (various by distro) Linuxes the way to disable the IPv6 is probably different.
Alto to stop Iptables IPV6 on CentOS / Fedora and RHEL issue:
SSH tunneling allows to send and receive traffic using a dedicated port. Using an ssh traffic can have many reasons one most common usage reason is to protect the traffic from a host to a remote server or to access port numbers which are by other means blocked by firewall, e.g.: (get around firewall filtering) SSH tunneling works only with TCP traffic. The way to make ssh tunnel is with cmds:
This command will make ssh to bind a port on localhost of the host host:/root# machine to the host desthost:destport (destination host : destinationport). Important to say deshost is the host destination visible from the remote-server.net therefore if the connection is originating from remote-server.net this means desthost will be localhost. Mutiple ssh tunnels to multiple ports using the above example commands is possible. Here is one example of ssh tunneling Let’s say its necessery to access an FTP port (21) and an http port (80), listening on remote-server.net In that case desthost will be localhost , we can use locally the port (8080) insetad of 80, so it will be no necessery to make the ssh tunnel with root (admin privileges). After the ssh session gets opened both services will be accessible on the local ports.
XFCE in Xubuntu looks quite nice, the developers of Xubuntu made it look and work really well.
Anyways XFCE was lacking many of the features that GNOME offers (among which the most important one in that case was creating Icons on the desktop). Even though creation of XFCE icons on the desktop has ways to be done, this is quite a complex process and its complete un-interactive. Besides that I could not find a way to add programs to XFce's main menus (as icons).
Therefore Xubuntu's Xfce is not suitable gui envorinment for Linux novice who had no knowledge on Linux commands and stuffs.
On the other hand I've seen many users coming from Windows world to Linux to have cope approximately well with GNOME.
Therefore I decided to subsitute Xubuntu's XFCE with GNOME I used apt-get to install GNOME desktop environment like so:
I’m using access to the mysql servers via localhost with mysql cli on daily basis. With time I’ve figured out that it’s pretty unahandy to always login with my root mysql password, I mean each time to enter it, e.g.:
root@mysql-server:~# mysql -u root
Enter password:
...
Thus to make my life a way easier I decided to store my mysql root password in order to allow my root admin user to be able to login to my mysql server without asking for password. This saves time and nerves, as I’m not supposed to look up for the password file I store my server mysql root pass.
To allow my mysql cli interface, to login passwordless to the SQL server I had to create the file /root/.my.cnf readable only for my root user and store my MySQL username and password there.
Now next time I use the mysql console interface to access my mysql server I don’t have to supply the password, here is how easier is the mysql login afterwards:
root@mysql-server:~# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3520
Server version: 5.0.77 Source distribution
Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.
mysql>
The only downside of using .my.cnf to store permanently the mysql server root and password is from security standpoint. If for instance somebody roots my servers, where I have stored my root user/pwds in .my.cnf , he will be able immediately to get access to the MySQL server.
Another possible security flaw with using the mysql passwordless login “trick” is if somebody forgets to set proper file permissions to, .my.cnf
Once again the file should possess the permissons of:
On a couple of occasions, I’ve had the issue of loosing / forgetting a MySQL password at other times I had to login to servers which contained MySQL servers with a password I don’t know.
In any of this occasions I was required to restore the ROOT access to the mysql server.
Sadly recoving a mysql lost root password is not really possible in a easy way, thus in most cases the only option one have is to stop the mysql server and run it again in a special skip-grant-tables mode, which runs the server in a sort of passwordless safe mode and makes it accessible without admin password through mysql cli .
To Omit the password check the skip-grant-table option instructs the MySQL server not to check in mysql.user while any request to connect with mysql client to the server is made.
Therefore one can login to the mysql server passwordless and reset the current (lost) password to another one. Thease can be achived in the following four easy steps:
1. Stop the MySQL server
mysql:~# /etc/init.d/mysqld stop
2. Run the mysql server with the –skip-grant-tables option
mysql:~# mysqld_safe --skip-grant-tables &
3. Login to the mysql and change current mysql root password
mysql:~# mysq -u root
mysql> UPDATE user SET password=PASSWORD('yournewpassword')
WHERE user='root';
mysql> FLUSH privileges;
A friend of mine (Dido) who is learning C programming, has written a tiny chat server / client (peer to peer) program in C. His program is a very good learning curve for anyone desiring to learn basic C socket programming. The program is writen in a way so it can be easily modified to work over UDP protocol with code:
To Use the client/server compile on the server host tiny-chat-serer-client.c with:
$ cc -o tiny-chat-server tiny-chat-server.c
Then on the client host compile the client;
$ cc -o tiny-chat-client tiny-chat-client.c
On the server host tiny-chat-server should be ran with port as argument, e.g. ;
$ ./tiny-chat-server 8888
To chat with the person running tiny-chat-server the compiled server should be invoked with:
$ ./tiny-chat-client 123.123.123.123 8888
123.123.123.123 is the IP address of the host, where tiny-chat-server is executed. The chat/server C programs are actually a primitive very raw version of talk.
The programs are in a very basic stage, there are no condition checks for incorrectly passed arguments and with wrongly passed arguments it segfaults. Still for C beginners its useful …
I use Debian Linux for my desktop for quite some time; Even though there are plenty of MP3 / CD players around in Debian, I’m used to the good old XMMS, hence I often prefer to use XMMS to play my music instead of newer players like RhythmBox or audacious. Actually audacious is not bad substitute for XMMS and is by default part of Debian but to me it seems more buggy and tends to crash during playing some music formats more than xmms ….
As most people might know, XMMS is no longer supported in almost all modern Linux distributions, so anyone using Debian, Ubuntu or other deb derivative Linux would have to normally compile it from source. Compiling from source is time consuming and I think often it doesn’t pay back the effort. Thanksfully, though not officially supported by Debian crew XMMS still can be installed using a deb xmms prebuilt package repository kindly provided by a hacker fellow knuta.
Using the pre-build deb packages, installing xmms on new Debian installs comes to: