Skip to content

Instantly share code, notes, and snippets.

View lavaldi's full-sized avatar
💛
Diving into JavaScript

Claudia Valdivieso lavaldi

💛
Diving into JavaScript
View GitHub Profile
#Instala django-disqus
pip install django-disqus
#ó descarga django-disqus.tar.gz de http://pypi.python.org/pypi/django-disqus/
#descomprímelo y córrelo con
python setup.py install
#Luego en setting.py agrega lo siguiente:
INSTALLED_APPS = (
...
@lavaldi
lavaldi / Ajustar-div-al-contenido.markdown
Last active August 29, 2015 13:56
A Pen by Claudia.
@lavaldi
lavaldi / elementos-vacios-jquery.js
Created February 15, 2014 01:58
Comprobar si Hay Elementos Vacíos con jQuery
$('*').each(function() {
if ($(this).text() == "") {
//Aquí Tu Código
}
});
/* devuelve True o False si el elemento esta vacío. */
var emptyTest = $('#myDiv').is(':empty');
@lavaldi
lavaldi / css-background-size.css
Last active August 29, 2015 13:56
Perfect Full Page Background Image
html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.myBackground.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myBackground.jpg', sizingMethod='scale')";
}
@lavaldi
lavaldi / git-rebase.md
Last active October 27, 2015 16:19
How to make a rebase?

First commit the changes from your local branch

git add .
git commit -m 'fix(about): something'

Switch to the branch with which you will do the rebase

git checkout {other-branch}
git pull origin {other-branch}
@lavaldi
lavaldi / npm-global-without-sudo.md
Last active May 7, 2022 19:06
Install `npm` packages globally without sudo on OS X and Linux

This is a copy paste of npm-global-without-sudo.md by sindresorhus

Install npm packages globally without sudo on OS X and Linux

npm installs packages locally within your projects by default. You can also install packages globally (e.g. npm install -g <package>) (useful for command-line apps). However the downside of this is that you need to be root (or use sudo) to be able to install globally.

Here is a way to install packages globally for a given user.

1. Create a directory for globally packages
@lavaldi
lavaldi / update-chrome.md
Created March 12, 2016 16:07
Update Chrome browser

Update or, if you haven't already, install Google Chrome

sudo apt-get update
sudo apt-get install google-chrome-stable
@lavaldi
lavaldi / install-nodejs-ubuntu.md
Created March 12, 2016 16:12
Install node.js in Ubuntu

#Debian and Ubuntu based Linux distributions

Also including: Linux Mint, Linux Mint Debian Edition (LMDE), elementaryOS and others.

Node.js is available from the NodeSource Debian and Ubuntu binary distributions repository (formerly Chris Lea's Launchpad PPA). Support for this repository, along with its scripts, can be found on GitHub at nodesource/distributions.

NOTE: If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 4.x on older distros.

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
@lavaldi
lavaldi / .eslintrc.json
Last active April 19, 2016 19:30
Task of gulp to pass ES6 to ES5 with ESLint
{
"env": {
"es6": true,
"browser": true,
"node": true
},
"globals": {
"jQuery": true,
"$": true
},
@lavaldi
lavaldi / standards.md
Last active May 10, 2016 19:14 — forked from anareyna/standards.md
Estándares

Diccionario

  • Camel case:

    • Ejm: elementName
  • Snake case:

    • Ejm: element_name

Prefijos comunes