configure {
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
# Inspired by https://gist.github.com/harel/9ced5ed51b97a084dec71b9595565a71 | |
from collections import namedtuple | |
import functools | |
import json | |
import six | |
Serialized = namedtuple('Serialized', 'json') | |
For a more detailed version of the steps below visit: https://developers.google.com/admin-sdk/directory/v1/guides/delegation
- Enable the necessary APIs (calendar, drive, gmail, etc.) in Cloud Console
- Create a service account, download the json key file, and enable domain wide delegation (DwD)
- Determine the required scopes (calendar readonly, drive read/write, etc.)
- In the G Suite console, an admin authorizes the service account (client ID) with the specified scopes
- The admin also identifies an account — with proper admin privileges — that the service account will impersonate (when you want to access user's data without manual authorization from the user)
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/bash | |
set -o nounset -o errexit -o pipefail | |
# Retries a command a with backoff. | |
# Based on https://stackoverflow.com/a/8351489/376366 | |
# and https://gist.github.com/fernandoacorreia/b4fa9ae88c67fa6759d271b743e96063 | |
# | |
# The retry count is given by ATTEMPTS (default 7), the | |
# initial backoff timeout is given by TIMEOUT in seconds | |
# (default 1). With default settings, it will try for about 1 minute. |
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
# Pulled from https://stackoverflow.com/questions/18641864/git-bash-shell-fails-to-create-symbolic-links | |
# https://stackoverflow.com/users/124119/camilo-martin | |
# Detect windows (assumes we are in 'msysgit' or similar). | |
windows() { [[ -n "$WINDIR" ]]; } | |
# Cross-platform symlink function. | |
# With one parameter, it will check whether the parameter is a symlink. | |
# With two parameters, it will create a symlink to a file or directory, | |
# with syntax: link $linkname $target |
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
# Reliable persistent SSH-Tunnel via systemd (not autossh) | |
# https://gist.github.com/guettli/31242c61f00e365bbf5ed08d09cdc006#file-ssh-tunnel-service | |
[Unit] | |
Description=Tunnel for %i | |
After=network.target | |
[Service] | |
User=tunnel | |
ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N tunnel@%i |
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
stages: | |
- test | |
- deploy | |
cache: | |
paths: | |
- vendor | |
# test job | |
test: |
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
#!/usr/bin/env python3 | |
# | |
# NOTE I HAVE MOVED ON TO USING A CUSTOM MARKER PRINTED OUT AND PASTED ON TOP OF MY CHARGER | |
# SIZED AT 4CM/SIDE COZMO HAS A MUCH BETTER CHANCE OF FINDING THE CHARGER - SIMILAR TO THE NEW VECTOR ROBOT | |
# the last "general purpose" version is https://gist.github.com/acidzebra/c02ff8c8ccb0e3a057ae0b48a5082a68/ad4ff9d686f7e2a1b197c4a26c6290d51a7c4380 | |
# if you want to print out your own you can find a version of marker CustomObjectMarkers.Hexagons2 used here | |
# http://cozmosdk.anki.com/docs/generated/cozmo.objects.html?highlight=hexagons2#cozmo.objects.CustomObjectMarkers.Hexagons2 | |
# | |
# WHAT THIS PROGRAM DOES | |
# |
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.