Admin
Apr 16, 2016
15 comments
207
UPDATE HTML You can make them with a single div. It's nice to have classes for each direction possibility. <div class="arrow-up"></div> <div class="arrow-down"></div> <div class="arrow-left"></div> <div...
Snippet
Create a triangular shape
Admin
Apr 16, 2016
12 comments
1.13K
A scaffold in Rails is a full set of model, database migration for that model, controller to manipulate it, views to view and manipulate the data, and a test suite for each of the above. To generate a scaffold for a blog use the rails gener...
Snippet
Scaffolding in Rails
Admin
Apr 06, 2016
4 comments
826
Generate a controller rails generate controller "controller name" "action1 action2 action3" Delete a controller rails destroy controller "controller name" Create Model and Migration rails generate model "model name" This g...
Snippet
Ruby on Rails console commands
Admin
Apr 05, 2016
20 comments
622
Connecting for the first time sudo -u postgres psql Set the password \password postgres Logging in psql -h localhost -p <port no> -U <username> <database name> Commands list \h help on SQL commands \? help on psql com...
Snippet
PostgreSQL psql console commands
Admin
Apr 04, 2016
13 comments
777
Configure Gmail SMTP in Bootstrap _initAutoload() $config = array('ssl' => 'ssl', 'auth' => 'login', 'port' => 465, 'username' => 'YOUR USERNAME', 'password' => ...
Snippet
Sending Email with Zend using Gmail SMTP
Install the rbenv and Ruby dependencies sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties l...
Snippet
Create and Deploy a Ruby on Rails 4 App with Postgre...
Admin
Apr 04, 2016
18 comments
917
Download Ruby and install Check ruby installation: ruby -e "puts 1+1" -> 2 irb - for interactive ruby commands Download devkit for corresponding ruby version and extract to c:\devkit Browse to c:\devkit and run this: ruby dk.rb init type...
Snippet
Installing Ruby on Windows
Admin
Apr 04, 2016
3 comments
365
SELECT name, birthday, MONTH(NOW()), DAY(birthday), DAY(NOW()), DAY(NOW())+7 FROM test WHERE MONTH(birthday) = MONTH(NOW()) AND DAY(birthday) BETWEEN DAY(NOW()) AND DAY(NOW())+7
Snippet
MySQL: Birthdays in a week
Admin
Apr 04, 2016
8 comments
1.13K
The solution is to keep count of the number of times the function is called to execute AJAX request and on failed requests recall the function. The retryLimit can be modified to the number to times the AJAX function is called. function callback()...
Snippet
Retry failed AJAX request
Admin
Apr 04, 2016
11 comments
768
Forgot mysql server password? Are you looking at this page because you cannot access the mysql server installed on your pc/server when you were trying to see if it works well? Or do you receive error messages like the following? : ERROR 1045: Ac...
Snippet
Reset MySQL root password
Admin
Apr 01, 2016
12 comments
721
Development Install Ruby Install DevKit (http://rubyinstaller.org/downloads/) gem install capistrano --no-ri --no-rdoc Deployment Machine Update the software sources list And upgrade the dated applications: aptitude update aptitud...
Snippet
Capistrano - Installation and configuration
Admin
Apr 01, 2016
19 comments
1.03K
To run server.js, the socket.io file Install nodejs globally. install npm globally go to your project folder and install npm modules npm install connect npm install socket.io Make sure the port your're using is open in the iptables, if not...
Snippet
Configuring Socket IO on server