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
@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 / download-udemy-courses.md
Last active November 26, 2021 21:00
Downloading Udemy courses with youtube-dl
@lavaldi
lavaldi / showTerminalColors.sh
Last active October 19, 2021 17:37
Script to display all terminal colors
#!/bin/bash
#
# Source https://askubuntu.com/a/1171740/460859
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
@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 / tweaks-sublime-italic-operator-mono.md
Created March 16, 2017 02:02
Operator Mono & Sublime Text 3 themes
  1. Install Package Resource Viewer.
  2. In package control window select ‘Package Resource Viewer: Open Resource’.
  3. Scroll down until you find the option: ‘Color Scheme — Default’ (or your theme with color scheme .tmTheme) and select it.
  4. Add the following
<!-- Operator Tweaks -->
  <dict>
    <key>name</key>
 Italic HTML attribute names

For Mac

brew install youtube-dl
brew install ffmpeg
youtube-dl https://egghead.io/courses/course_name
@lavaldi
lavaldi / download_images.md
Created April 14, 2017 22:35
Descargar imágenes de una web

wget -nd -H -p -A jpg,jpeg,png,gif -e robots=off http://web.com

@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

@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 / 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