This file contains hidden or 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/bash | |
PID_FILE=~/run/openvpn.pid | |
if [ -e $PID_FILE ] && [ -s $PID_FILE ]; then | |
pid=`cat $PID_FILE`; | |
if [ ! "$(ps -eF | grep $pid | grep openvpn)" ]; then | |
echo "It seems that OpenVPN is not running and was not shutdown cleanly, remove the file '$PID_FILE' before attepting to start." | |
exit 1; |
This file contains hidden or 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
import config from './config.js' | |
import { google } from 'googleapis' | |
const scopes = ['https://www.googleapis.com/auth/analytics.readonly'] | |
const jwtClient = new google.auth.JWT(config.clientEmail, null, config.privateKey, scopes) | |
async function doTheThings() { | |
await jwtClient.authorize() | |
let response = await google.analytics('v3').data.realtime.get({ | |
'auth': jwtClient, |
NewerOlder