Skip to content

Instantly share code, notes, and snippets.

View HYChou0515's full-sized avatar
🏝️
Relax

HYChou HYChou0515

🏝️
Relax
  • tsmc
  • Taiwan
View GitHub Profile
@AWolf81
AWolf81 / SpringMVCWebConfig.java
Last active July 25, 2020 11:49
Spring boot configuration file (annotation-based) - configures localization
package mongodbdemo.config;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
@HYChou0515
HYChou0515 / Gmail_API_for_Python.md
Last active August 22, 2021 02:01
A simple gmail API for python

Usage:

  1. Create your public key
  2. pub_key=encrypt.encrypt(pass_word)
  3. save pub_key to the file gmail.pub
  4. Replace 'sample@gmail.com' in mail.py with your own gmail address
  5. Run send_mail.py, here you have two choices:
  • $./send_mail.py then type your password
  • $ echo "your_password" | ./send_mail.py for Unix-like system.

Example:

  1. Download as zip and extract