1. Add remote lxd server as a cloud in Juju (2.x)

    Sun 21 May 2017
    By Felipe Reyes

    Juju 2.x have the ability to add LXD as a provisioner, by default it can easily use a local lxd (juju bootstrap lxd), but how could we use a remote lxd?, the following instructions will guide you to achieve this:

    SSH into the remote server (e.g. 192.168 …

  2. Lynx: accept cookies always

    Sun 14 August 2016
    By Felipe Reyes

    From time to time I need to use lynx (or any other text based browser like links), for some reason my fingers usually type lynx, but having to accept cookies every time a new domain tries to send it to me it's annoying, so here is how you configure it …

  3. Multiple Local Environments with Juju

    Fri 23 January 2015
    By Felipe Reyes

    juju man

    Juju has the ability to use lxc or kvm to deploy services, this is done by the local provider, but sometimes during development you may want to have one environment up-n-running all the time for testing and you may need another one to run amulet tests, well at the beginning …

  4. Deploy a Python WSGI app with a Celery worker in Heroku

    Mon 24 February 2014
    By Felipe Reyes

    This article explains how to deploy a WSGI python web app + a celery worker.

    A recommended reading before moving forward with Heroku is The Process Model.

    Jimsy

    The Application

    The application that we are going to deploy to heroku has the following components:

    • WSGI App, it can be a Django or …
  5. Deploying a Python WSGI app with Vagrant and Puppet

    Wed 22 January 2014
    By Felipe Reyes

    These days the tendency among software companies is to have everything under version control systems (i.e. Git, Mercurial), all these is part of two software development strategies: continuous integration and continuous delivery. To read more about them I recommend you to read "Continuous Integration: Improving Software Quality and Reducing …

  6. How to start with Emacs

    Tue 03 December 2013
    By Felipe Reyes

    Part 0

    Before I could really be productive with emacs, I failed a couple of times, because I knew that emacs were powerful, but the default configuration shows you a simple text editor that look awful, without syntax highlight, without anti-alias, a color schema that really sucks.

    In GNU/Linux …

  7. .emacs

    Mon 02 December 2013
    By Felipe Reyes

    I hope you enjoy disecting my emacs config :D

    ;; to debug the .emacs file
    (setq debug-on-error nil)
    
    ;; setup the default mode to use
    ;;Text mode is happier than Fundamental mode ;-)
    (setq default-major-mode 'text-mode)
    
    ;; define the mail and name
    (setq user-mail-address "your@mail.com")
    (setq user-full-name "Your Name")
    
    ;;;;;;;;;;;;,;
    ;; UI setup ;;
    ;;;;;;;;;;;;;;
    (require …
  8. erc

    Mon 02 December 2013
    By Felipe Reyes

    This is my configuration for erc

    erc-cmd-NP function send the current track being played to the current chat buffer (channel or private).

    The connect- functions provide a quick access to the defined IRC server.

    ;;
    ;; erc.el
    ;; Login : <freyes@wampa>
    ;; Started on  Mon Aug 30 23:04:16 2010 Felipe Reyes …
  9. Org-mode and Beamer

    Mon 02 December 2013
    By Felipe Reyes

    Overview

    The LaTeX class beamer allows production of high quality presentations using LaTeX and pdf processing. Org-mode has special support for turning an Org-mode file or tree into a beamer presentation.

    Example

    Here it is an example of how a presentation file should look like

    #+TITLE:     Org Mode and Beamer …
  10. Postgresql Tips n' Tricks

    Fri 22 November 2013
    By Felipe Reyes
    • pg_stat_activity

    pg_stat_activity is a view that belongs to the postgresql catalog, it helps you to view the status of the queries that are in execution, the explanation of each column can be found in the postgresql manual The Statistics Collector section (I don't want to do a simply copy-paste, so …

  11. Skype in GNU/Debian AMD64

    Mon 18 February 2013
    By Felipe Reyes

    How to install Skype in Debian amd64

    • Check if your system has i386 arch support enabled
    $ dpkg --print-foreign-architectures
    i386
    
    • If you don't have i386 support enable it with the following commands:
    # dpkg --add-architecture i386
    # apt-get update
    
    • Then install the skype's dependencies with the following command:
    # apt-get install libqtgui4:i386 \
          libqtwebkit4 …
  12. C Snippets

    Tue 01 January 2013
    By Felipe Reyes

    Simple Swap Function

    #include <stdio.h>
    
    inline void swap(int *a, int *b){
      *a= *a+*b;
      *b=*a-*b;
      *a=*a-*b;
    }
    
    int main() {
      int a = 1;
      int b = 2;
    
      printf("before: a: %d - b: %d\n", a, b);
      swap(&a, &b);
    
      printf("after: a: %d - b: %d\n", a …
  13. Emacs Tips

    Tue 01 January 2013
    By Felipe Reyes
    • If you start emacs with "emacs -q" and the problem goes away, the problem is on your end: check your .emacs.
    • If "emacs -q" has problems and "emacs -Q" does not, it's caused by your distro or local admin.
  14. Python Snippets

    Tue 01 January 2013
    By Felipe Reyes

    Property

    def Property(f):
        fget, fset, fdel = f()
        fdoc = f.__doc__
        return property(fget, fset, fdel, fdoc)
    

    Usage Example

    class TtyExample (object):
    
        def __init__ (self):
            self._name = None
    
        @Property
        def name(f):
            "The name"
            def fget (self):
                return self._name
    
            def fset (self, value):
                assert isinstance (value, basestring)
                assert value …
  15. Mercurial

    Mon 03 December 2012
    By Felipe Reyes

    This is my mercurial configuration (~/.hgrc)

    [ui]
    username = Foo Bar <foobar@example.com>
    merge = emacs
    
    [extensions]
    pager =
    rebase = 
    churn =
    hgshelve = ~/.hg.d/hgshelve.py
    keyword =
    fetch =
    activity=~/.hg.d/hgactivity/activity.py
    mq =
    hg_histedit=~/.hg.d/hg_histedit.py
    color =
    
    [diff]
    git = on
    
    [pager]
    pager = LESS='FSRX' less
    attend = glog
    
    [keywordmaps …
  16. rxvt-unicode

    Sat 11 June 2011
    By Felipe Reyes

    The Rxvt terminal is a really good terminal emulator, actually it has been my default terminal since at least 4 years ago. I started using it after getting tired of gnome-terminal (it's too fat and heavy for me).

    Screenshot

    To install it you just must do the follow:

    aptitude install rxvt-unicode …
  17. About Me

    Sun 10 October 2010
    By Felipe Reyes

    A Software Engineer, Debian enthusiast, free and open source software developer (or at least I try)

    Yeah, that's me.

    [FSF Associate Member] Proud FSF associate member :)

    GNU/Linux Distributions Used