Skip to content

Instantly share code, notes, and snippets.

View mezubeen's full-sized avatar
🎯
Focusing

Babar mezubeen

🎯
Focusing
View GitHub Profile
@mezubeen
mezubeen / samplerest.js
Created September 5, 2017 05:24 — forked from joshbirk/samplerest.js
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')
@mezubeen
mezubeen / extensions.json
Last active September 4, 2021 19:57
Visual Studio Code Settings Sync Gist
[
{
"id": "abusaidm.html-snippets",
"name": "html-snippets",
"publisher": "abusaidm",
"version": "0.2.1"
},
{
"id": "akamud.vscode-theme-onelight",
"name": "vscode-theme-onelight",
@mezubeen
mezubeen / saveToDrive.js
Created June 11, 2017 18:36 — forked from rainabba/saveToDrive.js
VERY basic example of how to save content to Google Drive using node.js using googleapis
// This requires a google developers console project. That UI changes regularly and I found it hard to learn, but at the time I'm creating this, the steps are:
// - At the top-right, select or create a new project (can't give step-by-step details here)
// - Visit https://console.developers.google.com/apis/api/drive/overview
// - Enable API with your options (not sure they matter much, but API must be enabled)
// - Visit https://console.developers.google.com/permissions/serviceaccounts
// - Create a new service account if you don't already have one or don't have one you want to use for these API calls. Select the "Furnish new private key" option and the JSON format along with "Enable Google Apps Domain-wide Delegation".
// - Save provided JSON in a SECURE location (don't include in your source code and ensure it's ignored by GIT)
// You can generate new keys and/or revoke this one at https://console.developers.google.com/apis/credentials