Skip to content

Instantly share code, notes, and snippets.

Luca G. Soave lgs

Block or report user

Report or block lgs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lgs
lgs / Auth.js
Created May 18, 2019 — forked from kaungmyatlwin/Auth.js
Firebase Vuex Auth Module
View Auth.js
import firebase from 'firebase';
const state = {
userId: '',
};
const actions = {
login({ commit, state }, { email, password }) {
return new Promise((resolve, reject) => {
firebase.auth().signInWithEmailAndPassword(email, password)
@lgs
lgs / database.rules.json
Created May 4, 2019 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
View database.rules.json
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@lgs
lgs / README.md
Created Apr 30, 2019 — forked from mickaelandrieu/README.md
Vue + Firebase + Auth Demo
View README.md

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

View Hide Div When Clicked Outside It
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Vanilla Javascript DropDown Menu Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="menu-dropdown">Menu &#9660;</div>
View Importing Remote GraphQL Schema into Gridsome
const { setContext } = require('apollo-link-context');
const { HttpLink } = require('apollo-link-http');
const { introspectSchema, makeRemoteExecutableSchema } = require('graphql-tools');
const fetch = require('node-fetch');
module.exports = function(api) {
api.createSchema(async function(graphql) {
const http = new HttpLink({
uri: 'http://example.com/api',
fetch
@lgs
lgs / GitConfigHttpProxy.md
Created Aug 27, 2018 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy
View GitConfigHttpProxy.md

Configure Git to use a proxy

##In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@lgs
lgs / index.js
Created Jan 16, 2018 — forked from codediodeio/index.js
Transactional Email Firebase Cloud Function with Sendgrid
View index.js
var functions = require('firebase-functions');
const sendgrid = require('sendgrid')
const client = sendgrid("YOUR_SG_API_KEY")
function parseBody(body) {
var helper = sendgrid.mail;
var fromEmail = new helper.Email(body.from);
var toEmail = new helper.Email(body.to);
var subject = body.subject;
@lgs
lgs / graphql.js
Created Dec 27, 2017 — forked from websoftwares/graphql.js
Getting GraphQL on webtask.io running
View graphql.js
'use latest'
const express = require('express')
const graphqlHTTP = require('express-graphql')
const { buildSchema } = require('graphql')
const app = express()
const webtask = require('webtask-tools')
const bodyParser = require('body-parser')
const schema = buildSchema(`
type Query {
@lgs
lgs / mailchimp-subscribe.coffee
Created Dec 12, 2017 — forked from chrsgrffth/mailchimp-subscribe.coffee
Vue – Mailchimp Subscribe Component
View mailchimp-subscribe.coffee
# To get the `action` prop:
#
# 1. Go to your dashboard on mailchimp.com and navigate
# to Lists > Signup Forms > Embedded Forms.
#
# 2. Copy the `<form>` action from the generated HTML code.
#
# 3. Pass that into the component via the prop, like so:
#
# <mailchimp-subscribe
@lgs
lgs / index.js
Created Oct 26, 2017 — forked from codediodeio/index.js
Simple Stripe Payments with Firebase Cloud Functions
View index.js
const functions = require('firebase-functions')
const admin = require('firebase-admin')
admin.initializeApp(functions.config().firebase);
const stripe = require('stripe')(functions.config().stripe.testkey)
exports.stripeCharge = functions.database
You can’t perform that action at this time.