One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| from urllib2 import urlopen | |
| def send_alert(): | |
| from smtplib import SMTP | |
| from email.mime.text import MIMEText | |
| msg = MIMEText('nuf said') | |
| msg['Subject'] = 'inventi.lt is unreachable' | |
| msg['From'] = '[email protected]' |
| <?php | |
| $conn = mysqli_connect("localhost", "xxxx", "xxxx", "test"); | |
| Header("Content-Tye: application/json; charset=UTF-8"); | |
| if (mysqli_connect_errno()) { | |
| echo json_encode(array("data"=>"Connection failed")); | |
| exit(); | |
| } |
| <?php | |
| $conn = mysqli_connect("localhost", "xxxx", "xxxx", "test"); | |
| Header("Content-Tye: application/json; charset=UTF-8"); | |
| if (mysqli_connect_errno()) { | |
| echo json_encode(array("data"=>"Connection failed")); | |
| exit(); | |
| } |
| <?php | |
| $conn = mysqli_connect("localhost", "xxxx", "xxxx", "test"); | |
| Header("Content-Tye: application/json; charset=UTF-8"); | |
| if (mysqli_connect_errno()) { | |
| echo json_encode(array("data"=>"Connection failed")); | |
| exit(); | |
| } |
| <?php | |
| $conn = mysqli_connect("localhost", "xxxx", "xxxx", "test"); | |
| Header("Content-Tye: application/json; charset=UTF-8"); | |
| if (mysqli_connect_errno()) { | |
| echo json_encode(array("data"=>"Connection failed")); | |
| exit(); | |
| } |
| ####in your nginx.conf server block | |
| server { | |
| # the port your site will be served on | |
| listen 7002; | |
| server_name localhost; | |
| charset utf-8; | |
| # Finally, send all non-media requests to the Django server. |
| AndroidManifest.xml => | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.agbenu.splashscreenexample" > | |
| <application | |
| android:allowBackup="true" | |
| android:icon="@mipmap/ic_launcher" | |
| android:fullBackupContent="true" |
| ## in models.py | |
| class CustomerUserManager(BaseUserManager): | |
| def _create_user(self, national_id, password, | |
| is_staff, is_superuser, **extra_fields): | |
| now = timezone.now() | |
| if not national_id: |
| #Sample nginx server block and uwsgi .ini configuration | |
| #path to ini | |
| /etc/uwsgi/apps-available/site.ini | |
| #path to nginx server block | |
| /etc/nginx/sites-available/site | |
| #sample nginx config server blk |