This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { google } = require('googleapis'); | |
const privatekey = require('./private-key.json'); // This was downloaded when you created your Service Account Key | |
const scopes = ['https://www.googleapis.com/auth/gmail.settings.basic']; | |
const auth = async (user) => { | |
try { | |
const jwtClient = new google.auth.JWT( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const privatePages = [ | |
'/private', | |
'/members' | |
]; | |
const publicPages = [ | |
'/sign-up', | |
'/log-in' | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR=/home/username/hosting/public | |
URL=http://your-webflow-site.webflow.io/ | |
cd $DIR | |
wget $URL --recursive --page-requisites --html-extension --convert-links -xnH -e robots=off | |
firebase deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.error-message { | |
display: none; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- signup function --> | |
<script> | |
signupButton.addEventListener('click', signup); | |
function signup() { | |
signupButton.style.display = 'none'; | |
signupError.style.display = 'none'; | |
var email = signupEmail.value; | |
var password = signupPassword.value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- auth state function --> | |
<script> | |
var privatePages = [ | |
'/private' | |
]; | |
var publicPages = [ | |
'/sign-up', | |
'/log-in' | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- logout function --> | |
<script> | |
logoutLink.addEventListener('click', logout); | |
function logout() { | |
firebase.auth().signOut(); | |
} | |
</script> | |
<!-- login function --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { google } = require('googleapis'); | |
const cal = google.calendar({ | |
version: 'v3', | |
auth: 'XXXXXX-YOUR-API-KEY-HERE-XXXXXX' | |
}); | |
// Set the calendar to query | |
const calendar = 'someone@domain.com'; | |
// Set beginning of query to 3 pm tomorrow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var params = { | |
searchCriteria: [ | |
'user=naughtyuser@domain.com', | |
'action=blocked' | |
], | |
logType: 4, | |
adom: "root", | |
maxNumMatches: 1000, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
soap.createClient(url, function (err, client) { | |
if (err) console.error(err); | |
client.getAdomList(args, function (err, result) { | |
if (err) console.error(err); | |
console.log(result); // Print the result | |
console.log(client.lastRequest); //Prints the request we sent | |
}); | |
}); |
NewerOlder