Skip to content

Instantly share code, notes, and snippets.

View lgs's full-sized avatar

Luca G. Soave lgs

View GitHub Profile
@lgs
lgs / database.rules.json
Created May 4, 2019 11:31 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@lgs
lgs / README.md
Created April 30, 2019 19:34
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

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

See the DEMO.

@lgs
lgs / Hide Div When Clicked Outside It
Created April 9, 2019 17:31 — forked from slavapas/Hide Div When Clicked Outside It
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>
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 August 27, 2018 10:11 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

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 January 16, 2018 13:12 — forked from codediodeio/index.js
Transactional Email Firebase Cloud Function with Sendgrid
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 December 27, 2017 11:31 — forked from websoftwares/graphql.js
Getting GraphQL on webtask.io running
'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 December 12, 2017 17:42 — forked from chrsgrffth/mailchimp-subscribe.coffee
Vue – Mailchimp Subscribe Component
# 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 October 26, 2017 20:54 — forked from codediodeio/index.js
Simple Stripe Payments with Firebase Cloud Functions
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
@lgs
lgs / feedly_api.md
Created September 28, 2017 12:18 — forked from d3m3vilurr/feedly_api.md
Unofficial Feedly API Document

IDs

  • user_id - user/:uid
  • feed_id - feed/:feed_uri
  • category_id - :user_id/category/:category (special category: global.all, global.uncategorized)
  • tag_id - :user_id/tag/:tag (special tag: global.saved)

APIs

http://cloud.feedly.com/:version/:api