This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| #!/usr/bin/env python3 | |
| # | |
| # Copyright (c) 2018 Matthew Earl | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| #!/bin/bash | |
| # With create-react-app, a self signed (therefore invalid) certificate is generated. | |
| # 1. Create some folder in the root of your project | |
| # 2. Copy your valid development certificate to this folder | |
| # 3. Copy this file to the same folder | |
| # 4. In you package.json, under `scripts`, add `postinstall` script that runs this file. | |
| # Every time a user runs npm install this script will make sure to copy the certificate to the | |
| # correct location | |
| TARGET_LOCATION="./node_modules/webpack-dev-server/ssl/server.pem" |
| const md5File = require('md5-file'); | |
| const path = require('path'); | |
| // CSS styles will be imported on load and that complicates matters... ignore those bad boys! | |
| const ignoreStyles = require('ignore-styles'); | |
| const register = ignoreStyles.default; | |
| // We also want to ignore all image requests | |
| // When running locally these will load from a standard import | |
| // When running on the server, we want to load via their hashed version in the build folder |
320x480 (~165 ppi mdpi)
320dp x 455dp
| package com.pascalwelsch.extensions | |
| import android.app.Activity | |
| import android.content.Context | |
| import android.content.Intent | |
| import android.os.Build | |
| import android.os.Bundle | |
| /** | |
| * Extensions for simpler launching of Activities |
| # Add project specific ProGuard rules here. | |
| # By default, the flags in this file are appended to flags specified | |
| # in C:\Users\bkhezry\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt | |
| # You can edit the include path and order by changing the proguardFiles | |
| # directive in build.gradle. | |
| # | |
| # For more details, see | |
| # http://developer.android.com/guide/developing/tools/proguard.html | |
| # Add any project specific keep options here: |
| // GSON can parse the data. | |
| // | |
| // Deserialization: | |
| // Note there is a bug in GSON 2.3.1 that can cause it to StackOverflow when working with RealmObjects. | |
| // To work around this, use the ExclusionStrategy below or downgrade to 1.7.1 | |
| // See more here: https://code.google.com/p/google-gson/issues/detail?id=440 | |
| // | |
| // Serialization: | |
| // <Type>RealmProxy objects are created by the Realm annotation processor. They are used to control | |
| // access to the actual data instead of storing them in fields and it is therefore them we need to register a |
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.