:::: MENU ::::

Home

  • Feb 12 / 2014
  • 0
Linux

Add a Swap File

When you’re running on a Linux System (or any Unix Operating System), it’s common to use a swap to complete and optimize the memory usage on the computer (especially for older ones). There are different ways to do that, you can:

  • Create a swap on a full partition system (most of Linux distribution will allow you to create it when installing the system or later using fdisk commands to create partition and activate it by following the same steps than below from #2)
  • Create a swap file later on any partition and activate it directly using command-line

I will present here the second case: the creation of a swap file (you will need to get root rights to perform most of the following commands).

  1. Create a file with dd command to create a 1024MB empty file (which will be used by swap).

    We are here writing a file of 1024*1024MB=1048576 blocks size with a Read/Write of 1024 bytes at a time.
  2. Now format the file to swap format
  3. Ensure that the rights access are correct on this file (for security purposes)
  4. Now activate swap on your file
  5. To deactivate swap on your file, juste use the following command

You can now check your swap availability by using the top or free -m command.

Right now, you probably want this swap file to be mounted and activated automatically at the system startup to avoid to perform these steps manually each time ? No problem, juste edit the /etc/fstab file and add this following line:


Your system has now a swap file ready to use !

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Feb 06 / 2014
  • 0
Google Chrome

Uninstall/Install manually Google Chrome

Sometimes, further to a problem, an automatic uninstall process of Chrome is not efficient. In that case, you will need to proceed with a manual uninstall. Here are the steps you can use to perform a safe reinstallation:

  1. Perform a Google Chrome uninstall as explained right here: https://support.google.com/chrome/answer/95319?hl=en
  2. Create a new Chrome user profile: https://support.google.com/chrome/answer/142059?hl=en
  3. Download file remove.zip (right click – Save as), save it on your desktop, unzip it and execute the remove.reg file to remove any Google Chrome entries in your Windows registry (you will probably need administrator rights for this step)
  4. Once you’ve performed all these steps, you can perform a fresh install of Google Chrome from the official website: https://www.google.com/chrome

You can now start again your favorite browser, and reconfigure it as you want (or simply connect to your Google Account and let the synchronization do it by itself …) !

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Jan 31 / 2014
  • 0
Android, Google Chrome

Set Chrome as default browser on Android

You have just installed Chrome on your Android device, and you now want to define it as default for your browser. Badly, you already have a browser installed on your phone which is the default browser… here are the steps to modify this:

  1. Go in the Settings of your phone
  2. In these settings, open the Applications parameters
  3. Once opened, look for the actual default browser (can be called Browser, Internet, …)
  4. Choose it, and under the Launch by default section, click on Clear defaults
  5. Go back to the Home and try to open any Internet link, the phone will now ask you which is the browser you want to use as default. You just need to choose Chrome

Voila, Chrome is now your default browser !

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Jan 27 / 2014
  • 0
Python, web2py

Web2py framework

Do you like web development and Python ? You’re looking for a framework free, complete and in a constant evolution (features, security, …) ? So Web2py is for you !

web2py is a free, open-source web framework for agile development of secure database-driven web applications; it is written in Python and programmable in Python. web2py is a full-stack framework, meaning that it contains all the components you need to build fully functional web applications.

web2py is designed to guide a web developer to follow good software engineering practices, such as using the Model View Controller (MVC) pattern. web2py separates the data representation (the model) from the data presentation (the view) and also from the application logic and workflow (the controller). web2py provides libraries to help the developer design, implement, and test each of these three parts separately, and makes them work together.

web2py is built for security. This means that it automatically addresses many of the issues that can lead to security vulnerabilities, by following well established practices. For example, it validates all input (to prevent injections), escapes all output (to prevent cross-site scripting), renames uploaded files (to prevent directory traversal attacks). web2py takes care of main security issues, so developers have less chances of introducing vulnerabilities.

web2py includes a Database Abstraction Layer (DAL) that writes SQL dynamically so that you, the developer, don’t have to. The DAL knows how to generate SQL transparently for SQLite, MySQL, PostgreSQL, MSSQL, FireBird, Oracle, IBM DB2, Informix and Ingres.

The DAL can also generate function calls for the Google Datastore when running on the Google App Engine (GAE). Experimentally we support more databases and new ones are constantly added. Please check on the web2py web site and mailing list for more recent adapters. Once one or more database tables are defined, web2py automatically generates a fully functional web-based database administration interface to access the database and the tables.

web2py differs from other web frameworks in that it is the only framework to fully embrace the Web 2.0 paradigm, where the web is the computer. In fact, web2py does not require installation or configuration; it runs on any architecture that can run Python (Windows, Windows CE, Mac OS X, iOS, and Unix/Linux), and the development, deployment, and maintenance phases for the applications can be done via a local or remote web interface. web2py runs with CPython (the C implementation) and PyPy (Python written in Python), on Python versions 2.5, 2.6, and 2.7.

web2py provides a ticketing system for error events. If an error occurs, a ticket is issued to the user, and the error is logged for the administrator.

web2py is open source and released under the LGPL version 3 license.

Official website : Official Website Web2py
Informations source : Web2py Book

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Jan 26 / 2014
  • 0
Google Chrome

Uninstall manually a Chrome extension

It can sometimes happen that an extension doesn’t want to be uninstalled with the steps provided by Google Chrome Support (to be tried first): https://support.google.com/chrome/answer/113907?hl=en.

Don’t worry, there’s a workaround available to delete definitely and manually this extension. Here are the steps:

  • Type about:extensions in the address bar and click on Developer Mode in the top-right hand corner
  • You will so find a ID line below any extension name. Copy this extension ID in a external text editor for example (you will need it several times later).
  • Right now, close entirely Chrome
  • Open Windows Start Menu and type the following line in the search box (or in the Execute menu):
    %LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions
  • In the explorer which has just opened, delete the folder with the ID matching the ID you have previously retrieved.
  • With the same steps, now access to this folder:
    %LOCALAPPDATA%\Google\Chrome\User Data\Default\Local Storage
  • In this folder, check if there is a file with a name such like chrome-extension_ID_0.localstorage (replace the ID value with the good one from your extension). If there is, delete it also.
  • Finally, one last step to be sure that this extension won’t re-install by itself automatically, you can check by typing regedit in the search bar of your Start Menu and then find the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist. Check that there is no entry containing the extension ID.
  • If there is, delete it ; else, everything is good !
  • You can now restart Chrome, and everything should run smoothly and fine !

Here it is, the extension doesn’t exist anymore on your PC ! (Don’t worry, you will be able to re-install it later if you want).

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Jan 26 / 2014
  • 0
Linux

Install FTP server – PureFTPd

You want to set up an FTP server on your Linux installation ?

Here are the main steps you can use to set up very quickly a reliable and secure server under BSD licence : Pure-FTPd. The commands used in this tutorial are the commands available under Ubuntu Server and can so be different depending on the distribution you are using, especially on the packages installation.

Package installation :

Group ftpgroup creation:

User ftpuser creation (linux user):

We can now create the user myuser (FTP user):

Les options sont les suivantes :

  • -u uid
  • -g gid
  • -d user home

If you want to change the user password, just use the following command-line:

Any time you perform a change or a creation of any user, you will need to re-generate the users database:

Then you can activate the authentication linked to Pure-FTPd and restart the server:

For a complete documentation, let’s go to the official PureFTPd website.

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
Question ? Contact