This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express'); | |
| var nodemailer = require("nodemailer"); | |
| var smtpTransport = require("nodemailer-smtp-transport"); | |
| var router = express.Router(); | |
| var smtpTransport = nodemailer.createTransport(smtpTransport({ | |
| host : "smtp.gmail.com", | |
| secureConnection : false, | |
| port: 465, | |
| auth : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "fileExtensions": [".js"], | |
| "excludeFiles": ["node_modules/**", "bower_components/**"], | |
| /*EcmaScript next generation Activated*/ | |
| "requireShorthandArrowFunctions": true, | |
| /* RULES */ | |
| "disallowEmptyBlocks": true, | |
| "disallowKeywordsOnNewLine": ["else"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Pick Audio file from Gallery: | |
| //Use MediaStore.Audio.Media.EXTERNAL_CONTENT_URI | |
| Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Audio.Media.EXTERNAL_CONTENT_URI); | |
| Pick Video file from Gallery: | |
| //Use MediaStore.Audio.Media.EXTERNAL_CONTENT_URI | |
| Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Video.Media.EXTERNAL_CONTENT_URI); | |
| Pick Image from gallery: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.aku.vn/idea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var strAmigos = [] | |
| var amigos = document.querySelec torAll('.uiList._262m._4kg li a._5q6s._8o._8t.lfloat._ohe') | |
| amigos.forEach(function(amigo){ | |
| var grover = amigo.getAttribute('data-hovercard'); | |
| var test = grover.substring(0,grover.search('&')) | |
| var fin = test.substring(test.search('=')+1) | |
| strAmigos += fin + ',' | |
| }) | |
| =============== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # commit your changes | |
| git commit -am "Made some awesome new changes, now its even awesomer" | |
| # tag the commit | |
| git tag -a v0.0.4 -m "Release version 0.0.4" | |
| # push to GitHub | |
| git push origin master --tags | |
| # publish npm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REACT HOT | |
| http://matthewlehner.net/react-hot-module-replacement-with-webpack/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Future versions of Hyper may add additional config options, | |
| // which will not automatically be merged into this file. | |
| // See https://hyper.is#cfg for all currently supported options. | |
| module.exports = { | |
| config: { | |
| // default font size in pixels for all tabs | |
| fontSize: 12, | |
| // font family with optional fallbacks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Prereq: | |
| apt-get install zsh | |
| apt-get install git-core | |
| Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh | |
| wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh | |
| and then you change your shell to zsh | |
| chsh -s `which zsh` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getTime() { | |
| now = new Date(); | |
| fecha = new Date("2017-10-30 00:00:00"); | |
| diffDate = (fecha - now) | |
| months = diffDate / 1000 / 60 / 60 / 24 / 30; | |
| monthsRound = Math.floor(months); | |
| days = diffDate / 1000 / 60 / 60 / 24 - (30 * monthsRound); | |
| daysAux = diffDate / 1000 / 60 / 60 / 24; |
OlderNewer