Step by step installing VNC Server on Ubuntu 14.04

Linux, Ubuntu, 2015-06-16 23:24:50 UTC
Server side 1. Update Ubuntu $ sudo apt-get update $ sudo apt-get dist-upgrade 2. Install some package; Gnome, XFCE, Firefox and Nano $ sudo apt-get install gnome-core xfce4 firefox nano 3. Installing VNC Server $ sudo apt-get install vnc4server 4. Run VNC Server for the first time $ vncserver You will require a password to access your desktops.
Share:     

Step by step creating Ubuntu swap file

Ubuntu, 2015-06-16 23:22:36 UTC
Login as root and type these command; 1. Swap allocation; # fallocate -l 512M /swap 2. Seting permission # chmod 600 /swap 3. Make swap # mkswap /swap 4. Swap activation # swapon /swap 5. Open fstab # nano /etc/fstab
Share:     

Using specific layout via the controller

Ruby on Rails, 2015-06-16 23:21:20 UTC
Layout placement is very important for Ruby on Rails application. Without layouts, the application looks bad. These ways to create layout via the controller; 1. This is a controller example class ExampleController < ApplicationController layout "my_layout" def index end def sesuatu end end Above code will be define as a layout for all of method in the controller 2. Layour for specific method class ContohController < ApplicationController layout "my_layout", only: [:index, :new, :create] def index end def another_method end def new end
Share:     

Installing .sh file

Linux, Ubuntu, 2015-06-16 23:17:28 UTC
1. Modify the file so it is executable $ chmod +x <installer-file-name> </installer-file-name> 2. Executing the file $ ./<installer-file-name><installer-file-name> </installer-file-name> or $ sh <installer-file-name><installer-file-name> </installer-file-name>
Share:     

DOM manipulating with JavaScript

Javascript, 2015-06-16 23:12:42 UTC
Scripting language usually used for small applications. At the present time, scripting language has evolved become enterprise applications. In the past, JavaScript has widely used to control the HTML page. But, today, JavaScript evolved widely as game engine, animation page, UI framework and so on. In this post, I will show you how to manipulate HTML DOM using JavaScript by exercise; 1. Adding an DOM node <!DOCTYPE html> <html> <head> <title>Example 1</title> </head> <body> <div id="ele01"></div> <script> document.getElementById('ele01').innerHTML = "Hi, this is an alement"; </script> </body> </html> If we run the script, we will see "Hi, this is an alement" exactly in div#ele01 box.
Share:     

Step by step authentication with Devise in Ruby on Rails

Ruby on Rails, 2015-06-16 23:09:58 UTC
1. Preparing your gem gem 'devise',: git => 'https://github.com/plataformatec/devise.git',: branch => 'lm-rails-4-2' 2. Run the following command $ bundle install 3. Install devise $ rails g devise:install 4. Add the following line to /config/development.rb config.action_mailer.default_url_options = {host: 'localhost', port: 3000}
Share:     

Setting up the Laravel Environment

Laravel, 2015-06-16 23:07:21 UTC
You must make a lot of changes to the application that you created. The application can be uploaded to the server via FTP or git pull. By creating an environment setting works, you don't need more time manually setting either on a local or online server. By creating an environment setting, the application decides themselves where they run now and run related settings. You can easily setting up the Laravel environment by these way; 1. Open /bootstrap/start.php $env = $app->detectEnvironment(array( 'local' => array('your_local_virtual_domain_name','other_name'), 'production' => array('your_site.com') ));
Share:     

Prevent users sign in via SSH

Linux, Ubuntu, 2015-06-16 23:05:03 UTC
By default, Linux bundled with SSH. On a server with a Linux OS, may have had hundreds of users. By default, these users can log in via SSH. Each user has different levels of knowledge of the security features on this Linux. Carelessness of a user can be bad to the server. If an intruder sign in via SSH, this can be very dangerous. Can be ascertained, intruder can perform any activity with ease through this SSH. In this tutorial I will explain how to prevent certain users in through SSH. In general, ssh cofig stored in / etc / ssh / sshd_config In order to prevent users from entering via SSH, type the following command; $ sudo nano / etc / ssh / sshd_config
Share: