Dec 14

Hi Folks!

In this tutorial, I will show you how to setup Node JS in Ubuntu 10.04.

Here are the things we would install

  • GNU make 3.81 or newer. Pre-installed on most systems. Sometimes called gmake.
  • Python 2.6 or 2.7. The build tools distributed with Node run on python.
  • libssl-dev (Node v0.6.x only.) Can usually be installed on *NIX systems with your favorite package manager. Pre-installed on OS X.
  • Node JS 

STEP 1:

For gmake, in ubuntu its make, so what you’ll do is:

1
sudo ln -s /usr/bin/make /usr/bin/gmake

STEP 2:

We need to install python 2.7

You can install python via apt-get:

1
2
3
4
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.7

or by compiling python

1
2
3
4
5
6
7
8
sudo apt-get install build-essential
sudo apt-get install libreadline5-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
cd Downloads/
wget http://python.org/ftp/python/2.7.2/Python-2.7.2.tgz
tar -xvf Python-2.7.2.tgz && cd Python-2.7.2/
./configure
make
sudo make altinstall

Step 3:

1
sudo apt-get install libssl-dev

Step 4:

1
2
3
4
5
6
git clone https://github.com/joyent/node.git
cd node
git checkout v0.6.19 #Try checking nodejs.org for what the stable version is
./configure
make
sudo make install

Then you are done installing Node JS!!!!

Now to test your node js do the hello world test by creating a file named hello_world.js and paste the code below.

1
2
3
4
5
6
7
8
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello Node.js\n');
}).listen(8124, "127.0.0.1");

console.log('Hello World!');
console.log('Server running at http://127.0.0.1:8124/');

Then execute the node command in the terminal

1
node hello_node.js

You should see an output like this:

1
2
3
Hello World!

Server running at http://127.0.0.1:8124/

If you are one of the people (Like me) who committed the mistake of installing node js via “sudo apt-get install node” here is how to fix your problem:

1
2
3
4
5
echo $PATH
/usr/local/sbin:/usr/loca<wbr>l/bin:/usr/sbin:/usr/bin:<wbr>/sbin:/bin:/usr/games
</wbr></wbr>

export PATH=$PATH:/usr/bin

sources:

http://ubuntuforums.org/showthread.php?t=389841

http://askubuntu.com/questions/101591/how-do-i-install-python-2-7-2-on-10-04

https://github.com/joyent/node/wiki/Installation

http://www.quora.com/How-do-I-fix-this-error-for-node-js

http://howtonode.org/how-to-install-nodejs

 



Hi folks!

In this tutorial I will show you how to compile avconv with x246.

On your desired path make a directory avconv-source (i’ll use my home path for this tutorial)

1
mkdir ~/avconv-source

Download and install the x264 library

1
2
3
4
5
cd ~/avconv-source
git clone git://git.videolan.org/x264.git /x264
./configure --enable-static
make
sudo make install

Download the avconv source

1
2
3
4
5
6
cd ~/avconv-source
git clone git://git.libav.org/libav.git /avconv
./configure
./configure --enable-gpl --enable-libx264
make
sudo make install

And your done!

and you can now execute

1
 avconv -i test.mov -c:v libx264 -c:a copy test.mp4

 


Oct 2

Hi Folks! I will show you a list of Jquery Plugins that uses CSS3 for navigation menu

 

 

Halftone Navigation Menu With jQuery & CSS3

Halftone Navigation

Halftone is the reprographic technique that simulates continuous tone imagery through the use of dots, varying either in size or in spacing. “Halftone” can also be used to refer specifically to the image that is produced by this process.

 

CSS3 Fancy Menu / LavaLamp Menu

lava menu

Fancy menu was made popular by devthought, it is develop on top of the Mootools library. And later a jQuery version of this menu called lavalamp was made popular by Ganesh.

 

CSS3 Minimalistic Navigation Menu

css3 Navigation Menu

RocketBar – A jQuery And CSS3 Persistent Navigation Menu

 

Rocketbar

 

OS X Dock

We take a basic list of links and turn them into an awesome OS X dock of icons.

 

 

osx dock

 

Dashboard Menu

 

Dashboard Menu

 

CSS3 Styled jQuery Dropdown

 

Simple jQuery dropdown menu on CSS Tricks

CSS3 Styled Menu

 

jSlickmenu

 

jslick menu

The plugin called jSlickmenu, creates, well, slick menus with jQuery. Combined with some great CSS3 features likes rotation and shadows, this plugin can really lift up your design. It’s fairly easy to use, highly customizable and pretty cool (and fun!) to see.

 

FormBox – A jQuery & CSS3 Drop-Down Menu With Integrated Forms

 

formbox

When designing the layout for a website there’s one thing that we as designers are always conscious of – making things easier for users. No matter what it is your site offers, you’re still going to need to balance the interface in a way that keeps it very easy for users to find and perform core site functions around your site or service, ideally without having to load up a completely different page.

 

Some of these common functions are logging in, registering or even resetting a password, yet quite often in many cases we still provide users the same old experience – a separate page for logging in, another for signing-up and yet again another if you’ve forgotten what your login details were. Today I would like to present a project that tries to streamline this experience – FormBox.

 

Rocking and Rolling Rounded Menu with jQuery

Rocking and Roll

jQuery style side menu with CSS3

 

 

side menu

CSS and jQuery Tutorial: Fancy Apple-Style Icon Slide Out Navigation

 

Apple like nav

Hoped you loved my list! till next time folks!

 

 

 

 

 


SQL == MongoDB syntax

posted by kugutsumen
Sep 17

Hi folks! In this tutorial I will show you the converted query of mongodb from SQL

 First What is MongoDB? MongoDB (from “humongous”) is a scalable, high-performance, open source, document-oriented database. Written in C++.

Here it is

SQL Statement Mongo Statement
CREATE TABLE USERS (a Number, b Number)
implicit; can also be done explicitly with db.createCollection(“mycoll”)
ALTER TABLE users ADD …
implicit
INSERT INTO USERS VALUES(3,5)
db.users.insert({a:3,b:5})
SELECT a,b FROM users
db.users.find({}, {a:1,b:1})
SELECT * FROM users
db.users.find()
SELECT * FROM users WHERE age=33
db.users.find({age:33})
SELECT a,b FROM users WHERE age=33
db.users.find({age:33}, {a:1,b:1})
SELECT * FROM users WHERE age=33 ORDER BY name
db.users.find({age:33}).sort({name:1})
SELECT * FROM users WHERE age>33
db.users.find({age:{$gt:33}})
SELECT * FROM users WHERE age!=33
db.users.find({age:{$ne:33}})
SELECT * FROM users WHERE name LIKE “%Joe%”
db.users.find({name:/Joe/})
SELECT * FROM users WHERE name LIKE “Joe%”
db.users.find({name:/^Joe/})
SELECT * FROM users WHERE age>33 AND age<=40
db.users.find({‘age’:{$gt:33,$lte:40}})
SELECT * FROM users ORDER BY name DESC
db.users.find().sort({name:-1})
SELECT * FROM users WHERE a=1 and b=’q’
db.users.find({a:1,b:’q'})
SELECT * FROM users LIMIT 10 SKIP 20
db.users.find().limit(10).skip(20)
SELECT * FROM users WHERE a=1 or b=2
db.users.find( { $or : [ { a : 1 } , { b : 2 } ] } )
SELECT * FROM users LIMIT 1
db.users.findOne()
SELECT DISTINCT last_name FROM users
db.users.distinct(‘last_name’)
SELECT COUNT(*y)
FROM users
db.users.count()
SELECT COUNT(*y)
FROM users where AGE > 30
db.users.find({age: {‘$gt’: 30}}).count()
SELECT COUNT(AGE) from users
db.users.find({age: {‘$exists’: true}}).count()
CREATE INDEX myindexname ON users(name)
db.users.ensureIndex({name:1})
CREATE INDEX myindexname ON users(name,ts DESC)
db.users.ensureIndex({name:1,ts:-1})
EXPLAIN SELECT * FROM users WHERE z=3
db.users.find({z:3}).explain()
UPDATE users SET a=1 WHERE b=’q’
db.users.update({b:’q'}, {$set:{a:1}}, false, true)
UPDATE users SET a=a+2 WHERE b=’q’
db.users.update({b:’q'}, {$inc:{a:2}}, false, true)
DELETE FROM users WHERE z=”abc”
db.users.remove({z:’abc’});

Sep 17

Hi folks! Here is a quick tutorial on how to install a mongodb driver for PHP

First run

sudo pecl install mongo

Then open your php.ini file, Add this line to the php config file

extension=mongo.so

then restart your webserver

Thats I.T., you may want to look at the next tutorial. Implementing Mongodb with Codeigniter! Watchout for this!