Skip to main content

Posts

Showing posts with the label manual

Install Docker under Ubuntu 14.04 (Trusty)

Docker supports Ubuntu versions: Ubuntu Vivid 15.04 (64-bit) Ubuntu Trusty 14.04 (LTS) (64-bit) Ubuntu Precise 12.04 (LTS) (64-bit) Ubuntu Raring 13.04 and Saucy 13.10 (64 bit)  For both Vivid and Trusty you need nothing. It will work out of the box. Others will require some modifications. (Updating of some things, like kernel or installing with wget on 13.04) 1. To install docker from a repository do so: sudo apt - get update sudo apt - get install docker . io sudo ln - sf / usr / bin / docker . io / usr / local / bin / docker sudo sed - i '$acomplete -F _docker docker' / etc / bash_completion . d / docker . io 2. Now run it with: sudo apt - get install lxc - docker 3. Make it run on system boot: sudo update - rc . d docker . io defaults 4. Ready to go! Run container with an Ubuntu: sudo docker run - i - t ubuntu / bin / bash To disconnect, or detach, from the shell without exiting use the escape sequence Ctrl-p + Ctrl-q . 

Tmux quick start guide

Tmux is a handy terminal manager that allows you to switch between terminal sessions easily. Without losing history or windows upon ssh disconnects or similar. It is like screen , just better. (First of all because of using client-server based technology... ) Here is my minimal keyboard shortcuts guide that allows you to start using Tmux in a blink of an eye. Endless advanced commands and hotkey combinations you could always find by entering "man tmux" in a terminal. Tmux is installed quite easily in most of common linux based systems. Just type: Ubuntu: $ sudo apt - get install tmux CentOS: $ sudo yum install tmux This allows you to start using by starting it with $ tmux a | | tmux new This command first tries to attach to existing running tmux instance and creates new in case it is not found. Ctrl+b d - Will allow you to disconnect at any time. (This is also a way it is happening when you loose ssh session. How to connect - look earlier) Each sess...

Django: How to debug Django

There are several ways of debugging Django. I'll try to cover most common and tell what I know/use time to time. This article may become useful to Django newbies and is not intended to be "the only truth". It may help you know in general about debugging techniques commonly used in Python/Django projects that author is aware of. Let's get started. There are several methods to discuss here. 1. Print out into console. It may become handy while working with critical bugs that only appear in production for e.g. and are not traceable at development environment... The only way here to run your project manually and do debug in production. Those requirements are so rare that I only use standart (builtin) tools. There is a thing called PDB (Python Debugger). That comes in a standart set of usual python distribution. So it will be available to you at almost any environment where you have console access to your project. Here is an official documentation for pdb module ....

Installing CouchDB for Mac OS X. Nuances.

Our project will have a new architecture changes in future. We've chosen from different tech. But now we 're experimenting with CouchDB a bit. It may become a part of our new architectural Changes. I'll try to cover most of newbies observations with CouchDB for Python(Django) programmer, planning to use it in your project. First article will be, unsurprisingly, installing CouchDB under Mac OS X. It, sure, has some inches that you need to scratch. So let's roll... CouchDB is not a simple SQL database like you used to install before. It has own server to accept connections. And, in fact, you can work with database from your browser GUI (without other server proxy, like Django or ...). Anyway it will not be our target. Building JS UI is quite easier with CouchDB and changes your logic dramatically. To build UI with Python we need some proxy parts. Anyway, again, CouchDB is a standalone server, that runs on your server's port and talks to your APP/Browser/wha...

Django: How to add Google +1 button to your website.

What is Google +1 button? It's new Google social button. It's much similar to Facebook "Like" button. While available during one month it earned popularity that could compete with Facebook's social button. Corporation of Good knows what to do, so you probably want to have one on your website inline with Facebook's Like... Add Google +1 button to your site: - Open http://www.google.com/webmasters/+1/button/index.html and generate own button for your website. Google proposes HTML code like this: <html>   <head>     <title> +1 demo: Basic page </title>     <link rel = "canonical" href = "http://www.example.com" />     <script type = "text/javascript" src = "https://apis.google.com/js/plusone.js" >     </script>   </head>   <body>     <g:plusone></g:plusone>   </body> </html> It's quite simple, as you can see. And that's ...