Skip to content

Instantly share code, notes, and snippets.

View grovertb's full-sized avatar
🏠
Working from home

GroverTB grovertb

🏠
Working from home
View GitHub Profile
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 : {
{
"fileExtensions": [".js"],
"excludeFiles": ["node_modules/**", "bower_components/**"],
/*EcmaScript next generation Activated*/
"requireShorthandArrowFunctions": true,
/* RULES */
"disallowEmptyBlocks": true,
"disallowKeywordsOnNewLine": ["else"],
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:
http://www.aku.vn/idea
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 + ','
})
===============
# 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
REACT HOT
http://matthewlehner.net/react-hot-module-replacement-with-webpack/
@grovertb
grovertb / .hyper.js
Last active June 12, 2018 21:42
SyncHyper.js
// 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
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`
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;