Skip to content

Instantly share code, notes, and snippets.

import os
import time
from playwright.sync_api import sync_playwright, expect
import logging
URL = "https://admin.google.com/"
URL_USERS = "https://admin.google.com/ac/users"
USERNAME = input("Enter Google Admin username: ")
PASSWORD = input("Enter the password: ")
DELETION_DATE = input("""Enter the deletion date (e.g. "Fri, Mar 22, 2024"): """)
@NoSubstitute
NoSubstitute / gam-archive.sh
Last active July 21, 2022 21:25 — forked from zk-1/gam-archive.sh
This script will archive a Google Workspace account's email (as .mbox) and/or Google Drive files to a specified Google Drive folder.
#!/usr/bin/env bash
# Name: gam-archive.sh
# Usage: gam-archive.sh email_prefix [mail|drive|both]
# Example: gam-archive.sh jsmith mail
# Description: This script will archive a Google Workspace account's email (as .mbox) and/or Google Drive files to a specified Google Drive folder.
# Author: Zoë Kelly ([email protected]), Kim Nilsson ([email protected])
# License: MIT
# Created: 2020
# Updated: 2022-07-19
## Note: Depending on the export size and your upload speed, it could take 10 minutes or longer for each archival.
@Max-Makhrov
Max-Makhrov / email_to_me.gs
Created December 3, 2020 08:23
Write emails to myself from Google Script functions
function someImportantFunction() {
// [ 1 ]. do some stuff
//
//
//
Logger.log('Success!');
// [ 2 ]. Report the execution
var recipient = '[email protected]'; // change!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
@zk-1
zk-1 / gam-batch-archive.sh
Last active July 19, 2022 13:12
This scripts allows the batch archival of G Suite accounts, via the accompanying gam-archive.sh script
#!/usr/bin/env bash
# Name: gam-batch-archive.sh
# Usage: cat archive_user_list.txt | gam-batch-archive.sh mail|drive|both
# Description: This scripts allows the batch archival of G Suite accounts, via the accompanying gam-archive.sh script
# Author: Zoë Kelly ([email protected])
# License: MIT
# Created: 2020
# Updated:
## Note: The gam-archive.sh script should be in the same folder or else added to $PATH. The input file should have a list of G Suite users to be archived, each on a newline. The email prefix should be used, i.e. jsmith.
@zk-1
zk-1 / gam-archive.sh
Last active January 12, 2023 20:35
This script will archive a G Suite account's email (as .mbox) and/or Google Drive files to a specified IT Google Drive folder.
#!/usr/bin/env bash
# Name: gam-archive.sh
# Usage: gam-archive.sh email_prefix [mail|drive|both]
# Example: gam-archive.sh jsmith mail
# Description: This script will archive a G Suite account's email (as .mbox) and/or Google Drive files to a specified IT Google Drive folder.
# Author: Zoë Kelly ([email protected])
# License: MIT
# Created: 2020
# Updated: 2020
## Note: Depending on the export size and your upload speed, it could take 10 minutes or longer for each archival.
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active November 11, 2024 15:28
Byte formatting for Google Sheets
@meoso
meoso / Example.com-Password-Expiration-Notifications.ps1
Last active October 22, 2024 08:44
PowerShell Active Directory Password Expiration Email Notification
#################################################################################################################
#
# Password-Expiration-Notifications v20220823
# Highly Modified fork. https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64
#
# Originally from v1.4 @ https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27
# https://windowspoweressentials.com/2017/02/21/powershell-password-reminder-script-updated/
# https://github.com/titlerequired/public
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
@rubenrivera
rubenrivera / question.md
Last active September 2, 2024 23:26
Question - Answer from Web Applications [Show URL used to edit responses from a Google Form in a Google Spreadsheet by using a script](http://webapps.stackexchange.com/q/89551/88163)

Revision 3 http://webapps.stackexchange.com/revisions/89551/3

Show URL used to edit responses from a Google Form in a Google Spreadsheet by using a script

I'm trying to make the edit URL for a Google Form automatically populate in the response Google Sheet that it's attached to. I've seen this already and want to use it, but I'm having issues trying to figure out where exactly to put the script.

I've tried putting it in the script editor in the Google Spreadsheet that I would like the URL to appear in, but I'm not sure where to go from there. In the script editor I've tried to test it as an add-on but that didn't end up working.

I have little experience with scripts and the script editor in Google Sheets. As a final note I am using one other add-on called AutoCrat in the same Google Spreadsheet.

@mhawksey
mhawksey / getRowsData.gs
Created February 29, 2016 13:27
getRowsData and setRowsData - originally from the Google Apps Script developer site
// setRowsData fills in one row of data per object defined in the objects Array.
// For every Column, it checks if data objects define a value for it.
// Arguments:
// - sheet: the Sheet Object where the data will be written
// - objects: an Array of Objects, each of which contains data for a row
// - optHeadersRange: a Range of cells where the column headers are defined. This
// defaults to the entire first row in sheet.
// - optFirstDataRowIndex: index of the first row where data should be written. This
// defaults to the row immediately below the headers.
function setRowsData(sheet, objects, optHeadersRange, optFirstDataRowIndex) {
@vt0r
vt0r / GnuPG-2.2.md
Last active February 13, 2024 09:03 — forked from mattrude/GnuPG-2.1.md
Build/install instructions for GnuPG 2.2.x on Ubuntu and similar distros (formerly for 2.1.x)

GnuPG 2.2.x Build Instructions

Below are my build instructions for GnuPG 2.2.10, released on August 30th, 2018. These instructions are built for a headless Ubuntu 18.04 LTS server (and have also been tested on Ubuntu 14.04/16.04).

If you prefer, you may use the below install script to install GnuPG 2.2.x by running the following commands:

curl -OL "https://gist.githubusercontent.com/vt0r/a2f8c0bcb1400131ff51/raw/e0d2011d7b89bfe5b83c3f29f21949fb21354dd9/install-gnupg22.sh" && sudo -H bash ./install-gnupg22.sh

Install the needed dependencies