Skip to content

Instantly share code, notes, and snippets.

View GonzaloEspinoza's full-sized avatar

Gonzalo Espinoza GonzaloEspinoza

  • Potosi, Bolivia
View GitHub Profile

Configurar Nodemon con Babel (ES6)

Dependencias:

npm i -D babel-cli babel-preset-env nodemon

Configuración

Configurar babel para su correcto funcionamiento en el package.json:

@GonzaloEspinoza
GonzaloEspinoza / node_nginx_ssl.md
Created July 13, 2021 21:51 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@GonzaloEspinoza
GonzaloEspinoza / Application.java
Created November 6, 2020 21:32 — forked from Klerith/Application.java
Android Push Notification File para FCM
package com.tu-dominio.pushapp; <------ CAMBIAR!!!!
import io.flutter.app.FlutterApplication;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;
// Nota, esta linea la agregue
import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin;
@GonzaloEspinoza
GonzaloEspinoza / AppBar
Created August 19, 2020 16:33
hide Appbar and add color status bar
appBar: PreferredSize(
preferredSize: Size.fromHeight(0),
child:AppBar(
// backgroundColor: Colors.teal[600],
elevation: 0,
),
),
SliverAppBar(
title: Row(
children: <Widget>[
IconButton(
icon: Icon(Icons.menu),
onPressed: () {
Scaffold.of(context).openDrawer();
},
),
@GonzaloEspinoza
GonzaloEspinoza / sendPushNotification.js
Last active June 30, 2020 16:41
Firebase cloud message desde el servidor
'use strict'
var axios = require('axios');
function SendMessageFirebase(){
const obj={
to:"dC-uy3_Cs2E:APA91bFqHJ6hYpnBjgbUXQCNmJAfiNdb5J0U4A-uJYcOD1K7sbthe0Am9TP4zByBqfSjllWc0NeeLVfyWlAdzYYC2dtLNJ2nuzkKx73d73vw7Edmxsn7aSHTw5nuGMT8C9S1IBuW6K83",
@GonzaloEspinoza
GonzaloEspinoza / plugins.md
Created September 14, 2019 04:29 — forked from Klerith/plugins.md
Flutter: Curso de Flutter - Instalaciones recomendadas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Star Rating System</title>
<meta name="viewport" content="width=device-width">
<style>
.star{
color: goldenrod;
font-size: 2.0rem;
@GonzaloEspinoza
GonzaloEspinoza / docker-compose-wordpress.yaml
Created June 21, 2019 02:08 — forked from pablokbs/docker-compose-wordpress.yaml
Docker-compose para wordpress con mysql
## docker-compose para correr wordpress con una base de datos en mysql
## by PeladoNerd https://youtu.be/eoFxMaeB9H4
version: '3.1'
services:
wordpress:
image: wordpress:php7.1-apache
ports:
@GonzaloEspinoza
GonzaloEspinoza / parse-jwt.js
Created November 15, 2018 03:18 — forked from Klerith/parse-jwt.js
Parse - JWT - Obtener Payload y fecha de creación y expiración
function parseJwt (token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};