Skip to content

Instantly share code, notes, and snippets.

View HoLengZai's full-sized avatar
💭
In The Cloud

HoLengZai

💭
In The Cloud
View GitHub Profile
@HoLengZai
HoLengZai / popimap.sh
Created July 29, 2021 14:10 — forked from jay0lee/popimap.sh
Shell script that can do OAuth, domain-wide delegation or password based IMAP/POP/SMTP authentication
#!/bin/bash
#
# This script should be run from Linux and uses basic tools like grep, awk, date and openssl.
# You need to populate the client_id and client_secret variables below
# with your own GCP project values. Sample command lines:
#
# Use 3-legged IMAP OAuth (default):
# bash popimap.sh --email myaccount@example.com --protocol imap
#
# Use a service account and domain-wide delegation:
#Please refer to the Microsoft Docs website to get your PAT (Personal Access Tokens)
#https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops
param
(
[Parameter(Mandatory = $true)]
[string]$pat,
[Parameter(Mandatory = $true)]
[string]$instance,
@HoLengZai
HoLengZai / whynot.py
Created March 15, 2018 07:15 — forked from futurepaul/whynot.py
The “Why’d you push that button” button
#Step 1: Import the libraries we need
import pygame.mixer
import RPi.GPIO as GPIO
import glob
import random
import time
#Step 2: Fire up the sound mixer
pygame.mixer.init()