Skip to content

Instantly share code, notes, and snippets.

View zxdawn's full-sized avatar
🛰️
Flying

Xin Zhang zxdawn

🛰️
Flying
View GitHub Profile
@zxdawn
zxdawn / serverless-macos-aws.md
Created December 24, 2022 03:18 — forked from bretton/serverless-macos-aws.md
Setting up serverless on a mac and updating to latest version

The following is specific to MacOS users, however similar guides may exist for Linux, or this can be adapted accordingly.

How to setup a serverless dev environment on a mac

In order to facilitate easier management of a local copy of a website, private github repository, and S3 bucket with Lambda functions as a website we will make use of the serverless framework.

Install XCode

You may need to check you have the latest XCode dev environment installed. You can install it via the App Store.

@zxdawn
zxdawn / keep_alive.py
Created July 14, 2022 11:33 — forked from ajsya/keep_alive.py
24/7 repl.it hosting script
from flask import Flask
from threading import Thread
app = Flask('')
@app.route('/')
def home():
return "I'm alive"
def run():
app.run(host='0.0.0.0',port=8080)
def keep_alive():
t = Thread(target=run)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
methods to download himawari data from
http://himawari.diasjp.net/expert/original/bin/original-main.cgi
"""
import datetime
import glob
import json
import logging
import os