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
""" | |
Again, don't just copy and paste the code below. This is for your study only. | |
Change the code to suit your case accordingly. | |
""" | |
import logging | |
import csv | |
import zipfile | |
from zoneinfo import ZoneInfo |
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
def send_email(sender, recipient, aws_region, subject, file_name): | |
# The email body for recipients with non-HTML email clients. | |
BODY_TEXT = "Hello,\r\nPlease find the attached file." | |
# The HTML body of the email. | |
BODY_HTML = """\ | |
<html> | |
<head></head> | |
<body> | |
<h1>Hello!</h1> | |
<p>Please find the attached file.</p> |
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
FROM php_base:latest | |
RUN apt update -y && apt upgrade -y | |
WORKDIR /var/www/html | |
RUN composer update --optimize-autoloader | |
COPY src/. /var/www/html | |
COPY build/php/.env.local /var/www/html/.env |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Just run `docker compose up --build` to build and run these containers | |
# To access the UI go to http://localhost | |
# While I haven't REALLY use program to access producer/consumer, you can use the Python wrapper | |
# provided by Confluent: https://developer.confluent.io/get-started/python/#introduction | |
# to get start | |
version: "3" | |
services: | |
zookeeper: |
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
♔ | |
♕ | |
♖ | |
♗ | |
♘ | |
♙ | |
♚ | |
♛ | |
♜ | |
♝ |
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
<?php | |
/** | |
* One of my task is to create a function that find the next business day. | |
* | |
* Reference: https://stackoverflow.com/a/5532070/1802483 | |
*/ | |
class GetNextBusinessDay{ | |
// Get a list of holiday in https://holidayapi.com/. Then I copy, paste and edit it manually to make this list | |
private $holidayList = [ | |
"2020-04-04", |
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
from oauth2client.service_account import ServiceAccountCredentials | |
import httplib2 | |
import json | |
import pandas as pd | |
# https://developers.google.com/search/apis/indexing-api/v3/prereqs#header_2 | |
JSON_KEY_FILE = "json_key_file_downloaded_after_creating_your_google_service_account_see_above_details_on_how_to_do.json" | |
SCOPES = ["https://www.googleapis.com/auth/indexing"] |
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/local/bin/python3 | |
''' | |
This program is used to get all search terms in Google search console and save it in MSSQL DB. | |
Please note: Just using this .py is not enough. You need to create a Google service account in google API console and | |
connect that service account to Google search console property. | |
Points to note: | |
=============== |
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
""" | |
Use HTTP/2 send APNS Example main reference | |
=========================================== | |
http://gobiko.com/blog/token-based-authentication-http2-example-apns/ | |
Error 410 to detect uninstalls | |
============================== | |
https://leftshift.io/mobile-tracking-uninstalls-on-ios-and-android | |
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1 |
NewerOlder