I hereby claim:
- I am jerivas on github.
- I am jerivas (https://keybase.io/jerivas) on keybase.
- I have a public key ASDMvVofW-Y777vKRS2Z3MEBb12ey9Y0ivfuR51KAN1IsQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Una lista de recursos básicos para empezar en el mundo del desarrollo web.
El Explorador de Archivos es el programa que te permite explorar los archivos que están almacenados en el disco duro de tu PC. Por defecto este programa esconde las extensiones de los archivos (el punto y las letras después del nombre del archivo). Por ejemplo, una foto puede tener el nombre "Mi foto", pero en realidad no estás viendo la extensión, que es "JPG". Así, si pudieras ver la extensión verías que el nombre real de la foto es "Mi foto.jpg". Distintos tipos de archivos tienen distintas extensiones, por ejemplo, los documentos de Word utilizan la extensión .docx
, la música utiliza .mp3
, los videos .mov
, y así sucesivamente.
Sigue este tutorial para dejar de ocultar las extensiones en tu computadora Windows. Al final, tu explorador de archivos t
#!/bin/sh | |
if [ -z "$1" ] ; then | |
echo "Please provide a project name as argument" | |
exit 1 | |
fi | |
project=$1 | |
# Configure your remote repository here |
def mortgage_calculator(form_data): | |
""" | |
Takes a single object `form_data` and returns all calculations in a `results` object. | |
Notes: | |
- The `Decimal` class simply takes any number or string and casts it into a decimal | |
value for calculations. See https://docs.python.org/2/library/decimal.html | |
- When you see '%.2f' that's simply forcing a value to be displayed with two | |
decimal places, i.e. 15.4504 comes out as 15.45. | |
""" |
Hello! I created a quick guide to fix websites after a migration. Depending on the application type, the steps will differ.
A regular Django / Apache app created from the control panel. Generally the only thing required is to reinstall the database driver (for either MySQL or Postgres) in the virtualenv. The virtualenv is a folder in the application directory, usually named
var classes = ["style1", "style2"]; | |
$("element").on("click", function(event) { | |
// Don't execute if the event is bubbling from a child node | |
if (event.target !== this) return; | |
var $el = $(this); | |
$.each(classes, function(i, klass) { | |
if ($el.hasClass(klass)) { | |
$el.removeClass(klass) | |
// Add the next class (if any) | |
if (i < classes.length - 1) $el.addClass(classes[i + 1]); |
// http://n33.co/2013/03/23/browser-on-jquery-19x-for-legacy-ie-detection | |
jQuery.browser={}; | |
(function() { | |
jQuery.browser.msie = false; | |
jQuery.browser.version = 0; | |
if(navigator.userAgent.match(/MSIE ([0-9]+)\./)) { | |
jQuery.browser.msie = true; | |
jQuery.browser.version = RegExp.$1; | |
} | |
})(); |
Bunch of random useful commands I've encountered/put together.
https://github.com/nojhan/liquidprompt
find . -regex ".*\.\(html\|css\|js\|scss\)" | xargs dos2unix
[CASE 1] Deploying to a brand new server:
FABRIC
dictionary in local_settings.py
. For SSH_USER
provide any username you want (not root), and the fabfile can create it for you.fab secure
. You simply need to know the root password to your VPS. The new user will be created and you can SSH with that from now on (if needed).fab all
. It will take a while, but after this your Mezzanine site will be live.Notice that not even once you had to manually SSH into your VPS. Note: some server providers need you to login as root once to change the default password they give you. It should be the only time you are required to SSH into the sever.
[CASE 2] If you already have a server, and you already have created a non-root user with sudo privileges: