Animated Flying Twitter Bird Code

8 Oct

Animated Flying Twitter Bird Code :

<script src=”; type=”text/javascript”></script>
<script type=”text/javascript”> var twitterAccount = “Your twitter account name”;tripleflapInit();</script>
<script src=”; type=”text/javascript”></script>


Note :

Replace “Your twitter account name” with your twitter user name.(

Referred by :



Ubuntu Commands

4 Oct

Ubuntu Commands list :

Terminal : Ctrl + Alt + T

File & Directory Commands :


The pwd command will allow you to know in which directory you’re located


The ls command will show you (‘list’) the files in your current directory.


The cd command will allow you to change directories.


The cp command will make a copy of a file for you.


The mv command will move a file to a different location or will rename a file.


Use this command to remove or delete a file in your directory.


The rmdir command will delete an empty directory.


The mkdir command will allow you to create directories.


The man command is used to show you the manual of other commands.


The sudo command is used to perform file operations on files that the Root User would only be allowed to change.

More Info : cd

To navigate into the root directory, use “cd /”

To navigate to your home directory, use “cd” or “cd ~”

To navigate up one directory level, use “cd ..”

To navigate to the previous directory (or back), use “cd -”

Running a File Within a Directory :


System Information Commands :


The df command displays filesystem disk space usage for all mounted partitions.


The du command displays the disk usage for a directory.


The free command displays the amount of free and used memory in the system.


displays information on your Linux system, running processes and system resources.

uname -a:

prints all system information, including machine name, kernel name & version, and a few other details.

lsb_release -a :

The lsb_release command with the -a option prints version information for the Linux release you’re running.

1)Command privileges.

sudo command – run command as root
sudo su – root shell open
sudo su user – open shell as a user
sudo -k – forget your password sudo
gksudo command – sudo visual dialog (GNOME)
kdesudo command – sudo visual dialog (KDE)
sudo visudo – edit / etc / sudoers
gksudo nautilus – root file manager (GNOME)
kdesudo konqueror – root file manager (KDE)
passwd – change your password

2)Command Network

ifconfig – displays information network
iwconfig – displays information from wireless
sudo iwlist scan – scan wireless networks
sudo /etc/init.d/networking restart – reset the network
(file) /etc/network/interfaces – manual configuration
ifup interface – bring online interface
ifdown interface – disable interface

3)Commands Display

sudo /etc/init.d/gdm restart – reset X (Gnome)
sudo /etc/init.d/kdm restart – reset X (KDE)
(file) /etc/X11/xorg.conf – show Configuration
sudo dpkg-reconfigure – reconfigure xserver-xorg-phigh – reset configuration X
Ctrl+Alt+Bksp – X display reset if frozen
Ctrl+Alt+FN – switch to tty N
Ctrl+Alt+F7 – switch back to X display

4)Commands Service System.

start service – service to start work (Upstart)
stop service – service to stop working (Upstart)
status service – check if service is running (Upstart)
/etc/init.d/service start – start service (SysV)
/etc/init.d/service stop – stop service (SysV)
/etc/init.d/service status – check service (SysV)
/etc/init.d/service restart – reset service (SysV)
runlevel – get current runlevel

5)Commands for Firewall.

ufw enable – turn on the firewall
ufw disable – turn off the firewall
ufw default allow – allow all connections by default
ufw default deny – drop all connections by default
ufw status – current rules and
ufw allow port – to allow traffic on port
ufw deny port – port block
ufw deny from ip – ip block

6)Command System.

lsb_release -a – get the version of Ubuntu
uname -r – get kernel version
uname -a – get all the information kernel

7)Commands for Package Manager.

apt-get update – refresh updates available
apt-get upgrade – update all packages
apt-get dist-upgrade – version update
apt-get install pkg – installing pkg
apt-get remove pkg – uninstall pkg
apt-get autoremove – removing packages obsotletos
apt-get -f install – try to fix packages
dpkg –configure -a – try to fix a broken package
dpkg -i pkg.deb – install file pkg.deb
(file) /etc/apt/sources.list – list of repositories APT

8)Special Packages For commands.

ubuntu-desktop – Setting the standard Ubuntu
kubuntu-desktop – KDE Desktop
xubuntu-desktop – desktop XFCE
ubuntu-minimal – core earnings Ubuntu
ubuntu-standard – the standard utilities Ubuntu
ubuntu-restricted-extras – not free, but useful
kubuntu-restricted-extras – ditto KDE
xubuntu-restricted-extras – ditto XFCE
build-essential – packages used to compile
linux-image-generic – latest generic kernel image
linux-headers-generic – latest headlines

9)Applications commands.

nautilus – File Manager (GNOME)
dolphin – File Manager (KDE)
konqueror – Web browser (KDE)
kate – text editor (KDE)
gedit – text editor (GNOME)

Referred by :


2)Nikesh Jauhari

Cross-Browser CSS Gradient

25 Sep

CSS CODE: Gradient

SUPPORT((Firefox,Internet Explorer,Chrome,Safari,Opera,Netscape Navigator)

background: #1e5799; /* Old browsers */

background: -moz-linear-gradient(top, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%); /* FF3.6+ */

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1e5799), color-stop(50%,#2989d8), color-

stop(51%,#207cca), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */

background: -webkit-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */

background: -o-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Opera 11.10+ */

background: -ms-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* IE10+ */

background: linear-gradient(to bottom, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* W3C */

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=’#1e5799′, endColorstr=’#7db9e8′,GradientType=0 ); /* IE6-9

Referred by :
#Gradient_button{/* fallback */
background-color:#063053;/* chrome 2+, safari 4+; multiple color stops */
background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0.32,#063053),color-stop(0.66,#395873), color-stop(0.83,#5c7c99));

/* chrome 10+, safari 5.1+ */

/* firefox; multiple color stops */

/* ie 6+ */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=’#063053′, endColorstr=’#395873′);

/* ie8 + */
-ms-filter: “progid:DXImageTransform.Microsoft.gradient(startColorstr=’#063053′, endColorstr=’#395873′)”;

/* ie10 */
background-image: -ms-linear-gradient(#063053,#395873,#5c7c99);

/* opera 11.1 */
background-image: -o-linear-gradient(#063053,#395873,#5c7c99);

/* The “standard” */
background-image: linear-gradient(#063053,#395873,#5c7c99);

jQuery Effects

25 Sep

jQuery Effects

1.jQuery Simple  Hide/Show

<script src=”jquery.js”></script>


Full Example:

<!DOCTYPE html>
<script src=”jquery.js”></script>
<button id=”close”>Hide</button>
<button id=”open”>Show</button>


2.jQuery Fade :

1. fadeIn()

The jQuery fadeIn() method is used to fade in a hidden element.

<script src=”jquery.js”></script>


The jQuery fadeOut() method is used to fade out a visible element.

<script src=”jquery.js”></script>


The jQuery fadeToggle() method toggles between the fadeIn() and fadeOut() methods.

<script src=”jquery.js”></script>


The jQuery fadeTo() method allows fading to a given opacity (value between 0 and 1).

<script src=”jquery.js”></script>

Full Example:

<!DOCTYPE html>
<script src=”jquery.js”></script>

<p>fadeIn eg.</p>
<button>Click Here</button>
<div id=”div1″ style=”width:80px;height:80px;display:none;background-color:red;”></div><br>
<div id=”div2″ style=”width:80px;height:80px;display:none;background-color:green;”></div><br>
<div id=”div3″ style=”width:80px;height:80px;display:none;background-color:blue;”></div>


Referred by :



About jQuery

25 Sep

jQuery questions


What is jQuery?

jQuery is a lightweight JavaScript library that emphasizes interaction between JavaScript and HTML.
jQuery is a JavaScript Library.
jQuery greatly simplifies JavaScript programming.

Advantages of jQuery :

Ease of use
Large library
Ajax support
Great documentation and tutorials
Strong opensource community. (Several jQuery plugins available)
JavaScript enhancement without the overhead of learning new syntax
Ability to keep the code simple, clear, readable and reusable

jQuery Syntax


A $ sign to define/access jQuery
A (selector) to “query (or find)” HTML elements
A jQuery action() to be performed on the element(s)


$(this).hide() – hides the current element.
$(“p”).hide() – hides all <p> elements.


1.Is jQuery a library for client scripting or server scripting?
Ans: Client scripting

2.Is jQuery a W3C standard?
Ans: No

(Note:W3C standards define an Open Web Platform for application development that has the unprecedented potential to enable developers to build rich interactive experiences, powered by vast data stores, that are available on any device.)

3.What are jQuery Selectors?
Ans: Selectors are used in jQuery to find out DOM elements. Selectors can find the elements via ID, CSS, Element name and hierarchical position of the element.

4.The jQuery html() method works for both HTML and XML documents?
Ans: It only works for HTML.

5.What is the difference between HTML and XML?

XML was designed to describe data and to focus on what data is.
HTML was designed to display data and to focus on how data looks.

HTML is about displaying information.
XML is about describing information.

6.Difference between $(this) and ‘this’ in jQuery?
this and $(this) refers to the same element.
when ‘this’ is wrapped in $() ( ex:($(this).text()); ) then it becomes a jQuery object and you are able to use the power of jQuery.

7.Which sign does jQuery use as a shortcut for jQuery?
Ans: $(dollar) sign.

8.What does $(“div”) will select?
Ans: It will select all the div element in the page.

9.What does $(“div.parent”) will select?
Ans: All the div element with parent class.

10.What is the name of jQuery method used for an asynchronous HTTP request?
Ans: jQuery.ajax()

11.What is jQuery Selectors? Give some examples.

jQuery Selectors are used to select one or a group of HTML elements from your web page.
jQuery support all the CSS selectors as well as many additional custom selectors.
jQuery selectors always start with dollar sign and parentheses: $()
There are three building blocks to select the elements in a web document.

1) Select elements by tag name

Example: $(div)
It will select all the div elements in the document.

2) Select elements by ID

Example: $(#select”)
It will select single element that has an ID of select

3) Select elements by class
Example: $(“.helloclass”)
It will select all the elements having class helloclass

12.What is .siblings() method in jQuery?

We filter the elements fetched by an optional selector.

<p>Hello Again</p>
<p>And Again</p>
<script>$(“p”).siblings(“.selected”).css(“background”, “yellow”);</script>


Referred by :


jquery slider inside fancybox

5 Sep

Jquery Auto-Playing Slide-show inside fancy-box


/* Fancy box code */

<script type=”text/javascript”>
$(document).ready(function() {
‘overlayShow’    : true,
‘autoScale’: true,
‘transitionIn’    : ‘elastic’,
‘transitionOut’    : ‘elastic’



/*jquery code for image slide */

<script type=”text/javascript”>
$(“#slideshow > div:gt(0)”).hide();

setInterval(function() {
$(‘#slideshow > div:first’)
},  3000);


/* HTML */

<div> <a id=”fancybox” style=”text-decoration: underline;font-size: 13px”  href=”#slideshow”>Click Here</a></div>

<div id="slideshow">
     <img src="image1.jpg">
     <img src="image2.jpg">
     Pretty cool eh? This slide is proof the content can be anything.


/* css */

#slideshow {
    width: 600px;
    height: 400px;
#slideshow img {
    margin-top: 20px;
    margin-left: 38px;
    border: 2px solid #ccc;

#slideshow > div {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;

/* script */
<script type='text/javascript' src='{% media  "/media/js/googleshare.js" %}'></script>
<script type="text/javascript" src='{% media  "/media/js/fancybox/jquery.fancybox-1.3.4.pack.js" %}'></script>


<link rel="stylesheet" href='{% media  "/media/js/fancybox/jquery.fancybox-1.3.4.css" %}' type="text/css" media="screen" />


Referred by :



CSS CODE : Border-Radius

26 Jul

CSS CODE : Border-Radius

SUPPORT((Firefox,Internet Explorer,Chrome,Safari,Opera,Netscape Navigator)

-moz-border-radius: 2px 2px 2px 2px;
-webkit-border-radius: 2px 2px 2px 2px;
-o-border-radius: 2px 2px 2px 2px;
-ms-border-radius: 2px 2px 2px 2px;
-khtml-border-radius: 2px 2PX 2PX 2PX;
border-radius: 2px 2px 2px 2px;