Starting Your Own Business

www.iscm.ca – education, investment and mentoring

www.oncorp.com – Incorporation Services

Posted in Business | Leave a comment

Mentoring Partnership

Hi everyone,

We are pleased to announce that the Business Edge Program at the Rotman School of Management has partnered with MentorCity, an on-line mentor matching program that connects you to meaningful mentoring relationships.  

The premise of MentorCity is that throughout your life and career, there are times when you can benefit from the advice, guidance and support of a mentor. There are also times when you can share your expertise and experiences to guide mentees in the right direction. 

To join this exciting community, click on the following invitation link https://www.mentorcity.com/?invite_key=20Beta11;referrer_id=952

Let us know if you have any questions, we look forward to seeing you on MentorCity.

Posted in Jobs | Leave a comment

Canadian Schools

http://www.yorkdale.net/

www.rotmanexecutive.com/backtowork

www.rotmanexecutive.com/businessedge

http://makemore.info.yorku.ca/

 

Online Schools

http://www.athabascau.ca/

Posted in Education | Leave a comment

Job Opportunities for Tuesday, May 7, 2013

 

Hi All,

Please find the below the latest job postings:

Documentation Specialist at Export Trading Group

Business Analyst, City of Vaughan

Cross Platform Associate Producer (English) (French), CBC/Radio Canada

Finance and Administrative Director, Greenpeace Canada

Thanks,

The TRIEC Team

Posted in Jobs | Leave a comment

Most Popular Job Websites

http://www.monster.com/

http://www.careerbuilder.com/

http://ca.indeed.com/

http://www.simplyhired.ca/

http://www.glassdoor.com/

http://www.workopolis.com

http://www.bright.com/

http://www.ziprecruiter.com/

http://www.findtherightjob.com/

http://www.job.com/

http://www.beyond.com/

http://www.theladders.com/

http://toronto.en.craigslist.ca/sof/

http://toronto.en.craigslist.ca/web/

http://toronto.en.craigslist.ca/eng

http://www.localwork.ca/

http://www.sisystems.com/index.cfm?mg=cpo.MainViewOpps

http://careers.stackoverflow.com

https://www.odesk.com

http://www.dice.com/

Posted in Jobs | Tagged | Leave a comment

Find a job in canada – how to make it happen. Dr. Lionel Laroche

In depth analyses of the Canadian labor market and the challenges that people face when moving to Canada. Dr. Lionel Laroche – Hard skills vs. soft skills, at the IEP conference.

Posted in Cross Cultural Management | Comments Off on Find a job in canada – how to make it happen. Dr. Lionel Laroche

Nginx, PHP 5.3.10 and PHP-FastCGI (PHP5-FPM) on Ubuntu 10.04 (lucid)

The nginx is an open source Web server and a reverse proxy server for HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high concurrency, performance and low memory usage. Although commonly used to serve static content, it's quite capable of handling dynamic pages as well. This guide will help you get nginx up and running with PHP via FastCGI on your Ubuntu 10.04 (lucid) Linux VPS. To check the Ubuntu version type: lsb_release -a and press Enter.

Set the Hostname

Issue the following commands to make sure it is set properly:

hostname
hostname -f

The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN).

Install PHP-FPM: PHP FastCGI Process Manager

PHP-FPM (PHP FastCGI Process Management) is a patch for PHP to improve PHP’s FastCGI capabilities and administration. It is bundled with the official PHP distribution since version 5.3.3.

cd /tmp 
aptitude install python-software-properties 
add-apt-repository ppa:brianmercer/php5
apt-get clean; apt-get update; apt-get upgrade; apt-get dist-upgrade

Install/Update PHP5

Issue the following commands to update your system and install the nginx web server, PHP, and compiler tools:

apt-get install php5 php5-cgi php5-common php5-dev php-pear php5-cli php5-suhosin php5-gd php5-imagick php5-curl php5-mcrypt
apt-get install php5-fpm php5-ldap php5-memcache php-apc php5-mysql php5-sqlite php5-intl
apt-get install php5-snmp php5-tidy php5-xmlrpc php5-xsl php5-json php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-idn php5-imap


pear channel-update pear.php.net 
pear upgrade-all

Optional installation:

 apt-get install pdo pdo_sqlite sqlite 

Start PHP5-FPM

service php5-fpm start 

To check that PHP is listening on port 9000, run the following command:

netstat -ant | grep :9000

Output:

tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN

Tweak the php-fpm configuration:

nano /etc/php5/fpm/php5-fpm.conf

The following tweaks have been customized for a 512MB-1GB VPS. The line "request_terminate_timeout = 30s" is optional but I highly suggest you use it. It's saying that if a php-fpm process hangs it will terminate it if it continues to hang for 30 seconds. This will add stability and reliability to php application in the event there is a problem.

pm.max_children = 25
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 10
pm.max_requests = 500
request_terminate_timeout = 30s

Restart php5-fpm:

service php5-fpm restart

Install NGINX

Append the appropriate stanza to /etc/apt/sources.list. The Pgp page explains the signing of the nginx.org released packaging. Ubuntu 10.04:

deb http://nginx.org/packages/ubuntu/ lucid nginx
deb-src http://nginx.org/packages/ubuntu/ lucid nginx     

Install Nginx:

apt-get clean; apt-get update; apt-get upgrade; apt-get dist-upgrade
sudo apt-get install nginx   
...

Installing new version of config file /etc/nginx/fastcgi_params ...
Installing new version of config file /etc/nginx/nginx.conf ...
Installing new version of config file /etc/nginx/mime.types ...
Installing new version of config file /etc/logrotate.d/nginx ...
Installing new version of config file /etc/init.d/nginx ...
...

Check the version of Nginx: nginx -v or dpkg –print-avail nginx

To start Nginx, run the following command:

service nginx start

To check that Nginx is listening on port 80, run the following command:

netstat -ant | grep :80

Output:

tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN

Issue with starting Nginx.

Output:

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

Check runung PID for port 80:

lsof -i tcp:80 or fuser -n tcp 80

Kill processes and run Nginx:

fuser -k 80/tcp ; service nginx restart

Tweak the nginx configuration:

nano /etc/nginx/nginx.conf
user www-data;
worker_processes  1;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

events {use epoll; worker_connections  1024; multi_accept on;}

http {
    ##
    # Basic Settings
    ##
    client_max_body_size 20M;
    client_body_buffer_size 128k;

    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    sendfile    on;
    tcp_nopush  on;
    tcp_nodelay on;
    keepalive_timeout  65;
    types_hash_max_size 2048;
        # server_tokens off;
        # access_log off;
        # client_max_body_size 32m;
        # client_body_timeout 60;
        # client_header_timeout 60;
        # send_timeout 60;
        # reset_timedout_connection on;
    ##
    # Logging Settings error_log=[debug | info | notice | warn | error | crit]
    ##
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;
    error_log   /var/log/nginx/error.log info;

    ##
    # Gzip Settings
    ##
        gzip on;
        gzip_min_length 5000;
        gzip_buffers 16 8k;
        gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
        gzip_proxied any;
        gzip_comp_level 9;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_http_version 1.1;

        gzip_static on;
        ignore_invalid_headers  on;

    ##
    # Virtual Host Configs
    ##
        upstream php {
                server 127.0.0.1:9000;
         }
       include /etc/nginx/sites-enabled/*;
}

 

 

 

 

 

 

 

 

 

 

Posted in Technologies | Comments Off on Nginx, PHP 5.3.10 and PHP-FastCGI (PHP5-FPM) on Ubuntu 10.04 (lucid)

Introduction to MongoDB

Databases
MongoDB has databases, collections, and documents. Download an example file.

Collections
Collections correlate to tables within the relational database paradigm.Like tables, indexes
are applied to collections. A collection is a collection of documents and indexes.

Documents
In MongoDB, the primary object is called a document. MongoDB document is a JSON array with a set of keys that map to values.

Installing MongoDB

Connecting to a Database
The default host is localhost, and the default port is 27017.
Connecting to MongoDB database server at localhost port 27017:
$connection = new Mongo();
Connecting to a remote host with optional custom port:
$connection = new Mongo( “190.50.0.80:66001” );

Selecting a Database
MongoDB will create a new database if you try to select a database that doesn’t. Open connection to MongoDB server:
$db = $connection->selectDB(‘workout’);
or
$db = $connection->workout;

CRUD Operations
Create a collection or access to collection:
$user_collection = $db->user;
or
$user_collection= $connection->workout->user;

Creating a Document
$user = array(‘group_access_id’ =>1, ‘first_name’ => ‘Ruslan’, ‘last_name’ => ‘Verbelchuk’,‘phone’ => ”, “e-mail”=>’ruslan.verbelchuk@gmail.com’, “membership”=>”);
$user_collection->insert($user);

Asynchronous update does not return a value after insert a record.
$user_collection->insert($user);

Synchronously update hold execution until it has finished inserting. The application must wait for the database.
$user_collection->insert($user, array(‘safe’ => true));
To access the primary key:
$user_id = $user[‘_id’];

Save a Document
An _id value is specified and exists.
$user_collection->save($user);

Primary Keys and ObjectIds

MongoDB will automatically create a primary key (ObjectIds) for each document.
$user_id->getTimestamp();

Reading a Document
Access the document by the primary key:
$user_data=$user_collection->findone( array(‘_id’=>$user_id) );
echo ‘<br>First Name: ‘ . $user_data[‘first_name’] . ‘<br/>’;
echo ‘Last Name: ‘ . $user_data[‘last_name’] . ‘<br/>’;
echo ‘E-mail: ‘ . $user_data[‘e-mail’] . ‘<br/>’;
echo ‘<br/>’;

A second parameter that is an array of the fields to return:
$user_data=$user_collection->findone( array(‘_id’=>$user_id), array(‘phone’) );
echo “<p>”.print_r($user_data).”</p>”;

Get all documents:
$user_data=$user_collection->find();
echo $user_data->count() . ‘ document(s) found. <br/>’;
foreach ($user_data as $obj) {
echo ‘<br>First Name: ‘ . $obj[‘first_name’] . ‘<br/>’;
echo ‘Last Name: ‘ . $obj[‘last_name’] . ‘<br/>’;
echo ‘E-mail: ‘ . $obj[‘e-mail’] . ‘<br/>’;
echo ‘<br/>’;
}

Updating a Document
Using $set to update a few fields:
$user_collection->update(
array(‘_id’ =>$user_id),
array(‘$set’=>array(‘e-mail’=>’ruslan.verbelchuk@hotmail.com’,’phone’=>’4164440505′) )
);

Use update to add a value:
$user_collection->update(
array(‘first_name’=>’Ruslan’,’last_name’=>’Verbelchuk’),
array(‘$set’=>array(‘location’=>array(
‘country’=>’CA’,
‘province’=>’ON’,
‘city’=>’Toronto’,
‘zip_code’=>’M5M9T6’,
‘street_Name’=>’Yonge’,
‘street_type’=>’Str’,
‘street_direction’=>”,
‘street_number’=>’1450’,
‘street_type’=>”,
‘number_suffix’=>”,
‘unit_suite_apt’=>”,
‘date_time’=>”,
)
) )
);
Append values atomically to an array:
$user_collection->update(
array(‘first_name’=>’Ruslan’,’last_name’=>’Verbelchuk’),
array(‘$push’=>array(‘location’=>array(
‘country’=>’USA’,
‘province’=>’NY’,
‘city’=>’Rochester’,
‘zip_code’=>’12345’,
‘street_Name’=>’University’,
‘street_type’=>’Str’,
‘street_direction’=>”,
‘street_number’=>’23’,
‘street_type’=>”,
‘number_suffix’=>”,
‘unit_suite_apt’=>”,
‘date_time’=>”,
)
) )
);

Deleting a Document
justOne limit the deletion to a single document.
$criteria = array(‘last_name’=> ‘Verbelchuk’);
$user_collection->remove($criteria, array(“justOne” => true) );

Posted in MongoDB | Tagged | Comments Off on Introduction to MongoDB

FAQ: MongoDB

  1. Tools

 

Posted in Technologies | Comments Off on FAQ: MongoDB

Responsive Web Design

Responsive web design (often abbreviated to RWD) is an approach to web design in which a site is crafted to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from desktop computer monitors to mobile phones).

5 APIs that will transform the Web in 2013
http://blog.alexmaccaw.com/the-next-web
Changing Times For Web Developers – 6 Tips You Should Read To Survive
http://www.amazedsaint.com/2012/11/changing-times-for-web-developers-6.html

Frameworks:

  1. Bootstrap
  2. YUI and responsive grids:
    http://gridbuilder.herokuapp.com/,
    http://gridbuilder.herokuapp.com/layout.html
    http://www.youtube.com/watch?v=KpyBAQt7hUs, scroll to 43:10
    (although the first talk is very good – if you are familiar with jQuery UI, you will see that YUI one step ahead actually).
Posted in Technologies | Leave a comment