Note: This post is a summary of information paraphrased from an excellent blog post by Christian Sepulveda.
Create the app and download the necessary dependencies.
| // No Security | |
| { | |
| "rules": { | |
| ".read": true, | |
| ".write": true | |
| } | |
| } |
Create the app and download the necessary dependencies.
| <?php | |
| /** | |
| * Assumes https://github.com/Spomky-Labs/jose library is installed and autoloading is set up | |
| * Decode and verify token guide: https://github.com/Spomky-Labs/jose/blob/master/doc/operation/Verify.md | |
| */ | |
| use Jose\Factory\JWKFactory; | |
| use Jose\Loader; | |
| // We load the key set from a URL | |
| // JSON Key URL (JKU) - https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json. |
| <?php | |
| /** | |
| * Assumes https://github.com/Spomky-Labs/jose library is installed and autoloading is set up | |
| * Decode and verify token guide: https://github.com/Spomky-Labs/jose/blob/master/doc/operation/Verify.md | |
| */ | |
| use Jose\Factory\JWKFactory; | |
| use Jose\Loader; | |
| // We load the key set from a URL | |
| // JSON Key URL (JKU) - https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json. |
| from collections import OrderedDict | |
| from myproject.api.views import APIRootView | |
| from rest_framework import permissions, routers | |
| from rest_framework_nested.routers import NestedSimpleRouter | |
| class Router(routers.DefaultRouter): | |
| include_root_view = True | |
| include_format_suffixes = False | |
| root_view_name = 'index' |
| # see https://github.com/cmaessen/docker-php-sendmail for more information | |
| FROM php:5-fpm | |
| RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/* | |
| RUN docker-php-ext-install mysql mysqli sysvsem | |
| RUN pecl install xdebug-2.5.5 \ | |
| && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ |
| <CalendarView | |
| android:id="@+id/calendarView" | |
| android:layout_width="match_parent" | |
| android:layout_height="500dp" | |
| android:theme="@style/Theme.Custom" | |
| /> |
| // Create the Activity Indicator | |
| let activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .gray) | |
| // Add it to the view where you want it to appear | |
| view.addSubview(activityIndicator) | |
| // Set up its size (the super view bounds usually) | |
| activityIndicator.frame = view.bounds | |
| // Start the loading animation | |
| activityIndicator.startAnimating() |
| # coding: utf-8 | |
| from django.contrib import admin | |
| from django.contrib.auth.models import Group, User | |
| from django.contrib.auth.admin import GroupAdmin, UserAdmin | |
| from django.utils.translation import ugettext_lazy as _ | |
| class CustomUserAdmin(UserAdmin): | |
| fieldsets = ( |
| .col-xs-offset-right-12 { | |
| margin-right: 100%; | |
| } | |
| .col-xs-offset-right-11 { | |
| margin-right: 91.66666667%; | |
| } | |
| .col-xs-offset-right-10 { | |
| margin-right: 83.33333333%; | |
| } | |
| .col-xs-offset-right-9 { |