curl -X POST --header "Authorization: key=" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"to\":\"\",\"notification\":{\"body\":\"Yellow\"},\"priority\":10}"
This file contains hidden or 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
server { | |
listen 80; | |
server_name mysite.com; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443; | |
... | |
... |
This file contains hidden or 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
import toolz | |
class Token(object): | |
def __init__(self, id, token): | |
self.id = id | |
self.token = token | |
def get_id(self): | |
return self.id |
yum install python36u python36u-devel python36u-mod_wsgi
alias python='/usr/bin/python3.6'
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py
python -m pip install django mysqlclient
cp /etc/httpd/modules/mod_wsgi_python3.6.so /usr/local/apache/modules
- create/clone/move project to another location ( not /home/user/public_html ) because there is not any access to top level directories
- config apache
- make & config database ( project/settings.py )
- convert charset
ALTER TABLE table CONVERT TO CHARACTER SET utf8;
- Create Repository in github.com
- Go into the directory containing the project.
- Type
git init
- Type
git add .
to add all of the relevant files. - Type
git commit
- Type
git remote add origin https://github.com/<username>/<repo-name>
- Type
git config --global push.default simple
- Type
git branch --set-upstream-to=origin/master
- Type
git push
This file contains hidden or 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
APP_ENV=testing | |
APP_KEY=SomeRandomString | |
DB_CONNECTION=testing | |
DB_TEST_USERNAME=root | |
DB_TEST_PASSWORD= | |
CACHE_DRIVER=array | |
SESSION_DRIVER=array | |
QUEUE_DRIVER=sync |
This file contains hidden or 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
final ImageView backgroundOne = (ImageView) findViewById(R.id.background_one); | |
final ImageView backgroundTwo = (ImageView) findViewById(R.id.background_two); | |
final ValueAnimator animator = ValueAnimator.ofFloat(0.0f, 1.0f); | |
animator.setRepeatCount(ValueAnimator.INFINITE); | |
animator.setInterpolator(new LinearInterpolator()); | |
animator.setDuration(10000L); | |
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { | |
@Override | |
public void onAnimationUpdate(ValueAnimator animation) { |
This file contains hidden or 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/bin/env python | |
import time | |
import threading | |
import logging | |
try: | |
import tkinter as tk # Python 3.x | |
import tkinter.scrolledtext as ScrolledText | |
except ImportError: | |
import Tkinter as tk # Python 2.x | |
import ScrolledText |
This file contains hidden or 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
server { | |
listen 80; | |
root /vagrant; | |
index index.html index.htm index.php app.php app_dev.php; | |
# Make site accessible from http://set-ip-address.xip.io | |
server_name 192.168.33.10.xip.io; | |
access_log /var/log/nginx/vagrant.com-access.log; | |
error_log /var/log/nginx/vagrant.com-error.log error; |
NewerOlder