Code is more often read than written
– Guido Van Rosssum
Aquí no hay mucho que decir, estamos hablando de Python y por lo tanto aplican las reglas de estilo de Código de Python, debes escribir siguiendo la PEP8. Django también tiene sus propias convenciones para escribir código, estas las puedes encontrar aquí , coteja con las de Python, verás que son complementarias.
Si hemos usado Django seguro nos hemos enamorado de su forma de hacer formularios, sobre todo los que están relacionados con un modelo, puesto que son simplísimos. Hay que reconocer lo simple de Django, y gracias a esta simplicidad que no busca satisfacer completamente todas las necesidades podemos encontrarnos con situaciones que pues, no se apegan a lo que queremos hacer.
So, for the people that follows my blog or me in twitter/facebok knows that I usually works on Linux/macOS, when using servers I use to use Linux and I’m a huge fan of the shell. In linux while I enjoy using GNOME/XFCE none of them are my favorite desktop (that’s why I’m using macOS).
NOTE: This is a re-post from the old blog which you can find here
Quick post, this is an ancient method to speed up ssh connections, I’m just leaving it here.
When we use SSH mostly all the times we create a new connection, even if we are connecting with the same host at the same port with the same user. I’ve been using SSH for a long time and to me this was fine, at the end the connection is “pretty” fast and the delay time creating the connection is just ok.
Vagrant is a popular solution to isolate your development environment, while there are many images to use with vagrant the most popular is an Ubuntu server image cooked by HashiCorp. Although with the current computer specs having a virtual machine that uses 512MB in RAM is almost nothing (I bet Google Chrome is wasting more than that now) if you are like me you don’t like to have a Virtual Machine wasting resources.
I started to use vagrant to hold my development environment, it helps to keep the development environment isolated, since the app will run on a Linux server, with a specific database engine and probably some other specific modules, I don’t want to clutter my OS with all that stuff. More if I plan to work on another project that maybe, have a dependency on other versions of the same base (legacy Django perhaps?)
I have multiple blogs, one personal and others for projects that I have, I trust in WordPress because it’s pretty flexible and since version 3.5 the improvements are awesome, making the writing a lot easier.
Still I had a problem, I’m used to the WordPress app for iOS and Mac to avoid having to load the whole page. It is kind of limited (not all plugins are available in the App) but for a quick post it works. Well, the problem I had is that I post mostly to my personal blog, but one of my projects blog was the default and I didn’t knew how to set a default. I event asked for help.
wget -O - http://islascruz.org | \ grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | \ sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//'
582 total views, no views today
useful way to map “Option+left”/”Option+right” keys in iTerm2 to do by word jump (left and right). Although sending ^[b and ^[f seems to be cleaner.
I’ve been trying to get Option-arrow keys to move by word in iTerm2. I figured out a solution, but it’s weird. If anyone has an explanation or a better way to do this, let me know.
711 total views, no views today