Checking the links to your site (from affiliates) using cron and bash script.

2010-05-27 2 min read Fedora Learning Linux Uncategorized

If you have some affiliate links and are concerned about their presence then you can setup <a class="zem_slink freebase/guid/9202a8c04000641f80000000045c9c5b" title="Cron" rel="wikipedia" href="http://en.wikipedia.org/wiki/Cron">cron to check the links for you regularly. For this you need a very simple script (as below) and a cron entry (example further down).

#!/bin/bash –
#===============================================================================

#          FILE:  checklinks.sh

#         USAGE:  ./checklinks.sh

#   DESCRIPTION:  Check if the links exists on affiliate sites

#       OPTIONS:  —
#  REQUIREMENTS:  —
#          BUGS:  —
#         NOTES:  —
#        AUTHOR:  <a class="zem_slink" title="Amit Agarwal" rel="homepage" href="http://amit-agarwal.co.in">Amit Agarwal (AKA), amit.agarwal@amit-agarwal.co.in
#       COMPANY:  Individual
#       VERSION:  1.0
#       CREATED:  04/07/2010 08:19:29 AM IST
#      REVISION:  —
#===============================================================================

Continue reading

Using SSH-keys to connect to a server – Putty,Solaris,Linux

2010-05-27 5 min read Linux

Generating the ssh dsa  keys

ssh-keygen -b 1024 -t dsa
When this command is executed on your local machine, it will ask you for a passphrase and generate
a 1024 bit long (-b 1024) public/private dsa (-t dsa) key pair with the ssh-keygen command.
You can also create a rsa key (-t rsa).
You can leave out the bit length parameter (default bit length is 1024).

In case you don&#8217;t like the standard key name you can specify a name using the -f name parameter.
In the process you are asked for a place to save your keys. I kept the standard path. Then you are asked for a passphrase.
Now there are two paths which you can follow :
a) the short, easy but insecure way: use no passphrase, have easy access to your remote-server, feel paranoid about someone stealing your private key
b) the a bit longer, slightly less comfortable but secure way: use a passphrase, use ssh-agent and feel safe

Continue reading

Fedora 12 Beta now available

2010-05-27 1 min read Fedora Linux

<span style="font-size: x-large;"><a href="http://lwn.net/Articles/357770/rss">Fedora 12 Beta now available

The Fedora project has released Fedora 12 Beta. &#8221;We have reached the Fedora 12 Beta, the last important development milestone of Fedora 12. Only critical bug fixes will be pushed as updates leading up to the general release of Fedora 12, scheduled to be released in mid-November. We invite you to join us and participate in making Fedora 12 a solid release by downloading, testing, and providing us your valuable feedback.&#8221; Click below for a list of new features.

Continue reading

command not found – packagekit plugin

2010-05-27 0 min read Fedora Linux
\"Example
Image via Wikipedia

If you run into problems where you run some command and the command is not found and you have to install it and run the program again then why not use the command not found <a class="zem_slink freebase/en/plugin" title="Plug-in (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Plug-in_%28computing%29">plugin for Packagekit. Here is the description:

Continue reading

Pimp your ls

2010-05-27 1 min read Bash

Here are some of the things that you can do with your ls command.

First off you can use alias&#8217;s to help you type the most typical ls commands. I will give you some examples:

alias ls =&#8221;ls –color –classify&#8221;
alias ls.=&#8221;ls -d .*&#8221;

Very commonly used :

  <td>
    <div class="text codecolorer">
      alias ll="ls -lhvrt"<br /> lsd="ls -lUd */" # List directories only
    </div>
  </td>
</tr>
1
2

And after all this you can download the l script from pixelbeat. Quite interesting:

Continue reading

Firefox Disables Microsoft .NET Addon

2010-05-27 1 min read Linux

Firefox Disables Microsoft .NET Addon ZosX writes &#8221;Around 11:45 PM Friday night, I was prompted by Firefox that it had disabled the addons that Microsoft has been including with .NET — specifically, the .NET Framework Assistant and the Windows Presentation Foundation. The popup announcing this said that the &#8217;following addons have been known to cause stability or security issues with Firefox.&#8217; Thanks, Mozilla team, for hitting the kill switch and hopefully this will get Microsoft to release a patch sooner.&#8221; Here&#8217;s the Mozilla security blog entry announcing the block, which Mozilla implemented via its blocklisting mechanism.

Continue reading

vim - get mappings from the help tex files available with the scripts.

2010-05-27 2 min read Fedora Learning Linux Vim Tips

Here is a simple script that will show all the vim mappings from the tex file (help file that comes with the vim scripts).

This will prove to be very useful in usin gthe mappings 🙂

#!/bin/bash –
#===============================================================================

#          FILE:  get_mappings_from_tex_for_vim.sh

#         USAGE:  ./get_mappings_from_tex_for_vim.sh

#   DESCRIPTION:  Get the mappings from tex file

#       OPTIONS:  —
#  REQUIREMENTS:  —
#          BUGS:  —
#         NOTES:  —
#        AUTHOR:  <a class="zem_slink" title="Amit Agarwal" rel="self" href="http://blog.amit-agarwal.co.in">Amit Agarwal (AKA), amit.agarwal@amit-agarwal.co.in
#       COMPANY:  Individual
#       VERSION:  1.0
#       CREATED:  09/06/2009 09:19:19 PM IST
#      REVISION:  —
#===============================================================================
file=$1
IFS=$(echo -e &#8217;\n&#8217;)
for i in $(cat $file |<a class="zem_slink freebase/en/grep" title="Grep" rel="wikipedia" href="http://en.wikipedia.org/wiki/Grep">grep &#8221;^..line&#8221;)
do
#echo $i |<a class="zem_slink freebase/en/awk" title="AWK" rel="homepage" href="http://cm.bell-labs.com/cm/cs/awkbook/index.html">awk -F&#8221;&#8217;&#8221; '{print $2&#8221; &#8221; $3&#8221; &#8221;$4}&#8217;|awk -F&#8221;&&#8221; '{print $1&#8221; &#8221;$2}&#8217;
echo $i |awk -F&#8221;&#8217;&#8221; '{
if ( NF >= 4 )
{
print ($2&#8221;\t ->&#8221;$4&#8221;\t==»&#8221;$NF);
}
else
{
print($2&#8221;\t–>&#8221;$3);
}
fi
}&#8217;  |<a class="zem_slink freebase/en/sed" title="Sed" rel="wikipedia" href="http://en.wikipedia.org/wiki/Sed">sed &#8217;s/\h.*(/(/&#8217; |sed &#8217;s/>.*&/>/&#8217; |sed &#8217;s/\t*-.>$//&#8217; |sed &#8217;s/\//&#8217;

Continue reading
Older posts Newer posts