Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Meow

MksYi MksYi

💭
Meow
View GitHub Profile
@MksYi
MksYi / Firebase-Delete-Collection.py
Created Aug 14, 2018
Firebase 刪除集合測試
View Firebase-Delete-Collection.py
#!/usr/bin/python3
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
cred = credentials.Certificate("stust-game-firebase-adminsdk-z8f9e-565f1cf637.json")
firebase_admin.initialize_app(cred)
db = firestore.client()
@MksYi
MksYi / Firebase-Delete.py
Created Aug 14, 2018
Firebase 刪除測試
View Firebase-Delete.py
#!/usr/bin/python3
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
cred = credentials.Certificate("stust-game-firebase-adminsdk-z8f9e-565f1cf637.json")
firebase_admin.initialize_app(cred)
db = firestore.client()
@MksYi
MksYi / Firebase-Update.py
Created Aug 14, 2018
Firebase 更新測試
View Firebase-Update.py
#!/usr/bin/python3
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
cred = credentials.Certificate("stust-game-firebase-adminsdk-z8f9e-565f1cf637.json")
firebase_admin.initialize_app(cred)
db = firestore.client()
@MksYi
MksYi / Firebase-Read.py
Last active Aug 14, 2018
Firebase 讀取測試
View Firebase-Read.py
#!/usr/bin/python3
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
cred = credentials.Certificate("stust-game-firebase-adminsdk-z8f9e-565f1cf637.json")
firebase_admin.initialize_app(cred)
db = firestore.client()
#Get Collection
@MksYi
MksYi / Firebase-Write.py
Last active Aug 14, 2018
Firebase 寫入測試
View Firebase-Write.py
#!/usr/bin/python3
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
cred = credentials.Certificate("stust-game-firebase-adminsdk-z8f9e-565f1cf637.json")
firebase_admin.initialize_app(cred)
db = firestore.client()
View TEST.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MksYi
MksYi / Django-ssl.conf
Created Aug 13, 2018
Django + Apache2.4 + SSL conf
View Django-ssl.conf
<VirtualHost *:443>
ErrorLog /home/<User_Name>/MyProject/logs/error.log
CustomLog /home/<User_Name>/MyProject/logs/access.log combined
WSGIScriptAlias / /home/<User_Name>/MyProject/MyProject/wsgi.py
Alias /static/ /home/<User_Name>/MyProject/static/
Alias /templates/ /home/<User_Name>/MyProject/templates/
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
@MksYi
MksYi / wsgi.py
Created Aug 13, 2018
Django +Apache wsgi conf
View wsgi.py
"""
WSGI config for MyProject project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
@MksYi
MksYi / Django.conf
Created Aug 13, 2018
Django + Apache2.4 conf
View Django.conf
<VirtualHost *:80>
ErrorLog /home/<User_Name>/MyProject/logs/error.log
CustomLog /home/<User_Name>/MyProject/logs/access.log combined
WSGIScriptAlias / /home/<User_Name>/MyProject/MyProject/wsgi.py
Alias /static/ /home/<User_Name>/MyProject/static/
Alias /templates/ /home/<User_Name>/MyProject/templates/
<Directory /home/<User_Name>/MyProject>
Options FollowSymLinks
Order deny,allow