Skip to content

Instantly share code, notes, and snippets.

@KenjiOhtsuka
KenjiOhtsuka / copy_files.gs
Last active November 5, 2024 14:43
Google Apps Script to Copy Folder Recursively
/**
This is a code of Google Apps Script for copying google drive folder content to other folder.
## Which situation the code resolve.
Google doesn't allow to move folder content to other folder which is managed by
other organization according to the policy of the GSUITE organization.
And, Google doesn't allow to change the content owner to the user in other
organizations.
@tzapu
tzapu / docker-compose.yml
Last active September 26, 2022 05:13
docker compose file for local server, plex, transmission, sonarr, radarr, ombi, netdata, nextcloud
version: '2.1'
services:
transmission:
container_name: transmission
image: dperson/transmission
restart: unless-stopped
depends_on:
- plex
network_mode: host
environment:
@srv89
srv89 / python_email.py
Last active January 29, 2024 00:24
Python code for sending HTML email (Attachment + Multiple Recipients )
__author__ = 'srv'
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
username = '' # Email Address from the email you want to send an email
password = '' # Password
server = smtplib.SMTP('')
@mjseeley
mjseeley / dlAttachments.py
Last active October 17, 2020 12:32 — forked from baali/dlAttachments.py
Forked to add downloading of files with the same name and different contents. | WARNING: [messy code]
# Download ALL attachments from GMail
# 1. Script needs to be run via console not in an IDE, getpass.getpass() will fail otherwise.
# https://docs.python.org/2/library/getpass.html
# 2. Make sure you have IMAP enabled in your GMail settings.
# https://support.google.com/mail/troubleshooter/1668960?hl=en
# 3. If you are using 2 step verification you may need an APP Password.
# https://support.google.com/accounts/answer/185833
# 4. Reference information for GMail IMAP extension can be found here.
# https://developers.google.com/gmail/imap_extensions
@mikepea
mikepea / pr_etiquette.md
Last active September 12, 2024 14:58
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@seancdavis
seancdavis / zshrc
Last active January 24, 2024 17:10
zshrc file to work with `rbenv` and oh-my-zsh
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# ZSH_THEME="alanpeabody"
# Example aliases
#forked to ensure python 3.2+ compatibility & gmail API updates ...
#need more work as it crashes when encounters a mime type declared as "nonetype" ...
#coming soon :)
#
#original comments:
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib