- Run
npm install cordova-res --save-dev
- Create
1024x1024px
icon atresources/icon.png
- Create
2732x2732px
splash atresources/splash.png
- Add
"resources": "cordova-res ios && cordova-res android && node scripts/resources.js"
toscripts
inpackage.json
- Copy
resources.js
file toscripts/resources.js
- Run
sudo chmod -R 777 scripts/resources.js
- Run
npm run resources
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
Register a API in https://www.strava.com/settings/api | |
// Install plugin inAppBrowser | |
$ ionic cordova plugin add cordova-plugin-inappbrowser | |
$ npm install --save @ionic-native/in-app-browser | |
// I create a provider, but in this example I will do inside a "page". | |
// Import inAppBrowser in /pages/login/login.ts | |
import { InAppBrowser } from '@ionic-native/in-app-browser'; |
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
function Beautifier(html_source, options, js_beautify, css_beautify) { | |
//Wrapper function to invoke all the necessary constructors and deal with the output. | |
html_source = html_source || ''; | |
// BEGIN | |
html_source = html_source.replace(/\{\{((?:(?!\}\}).)+)\}\}/g, function (m, c) { | |
if (c) { | |
c = c.replace(/(^[ \t]*|[ \t]*$)/g, ''); | |
c = c.replace(/'/g, '''); | |
c = c.replace(/"/g, '"'); |
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
function style_html(html_source, options, js_beautify, css_beautify) { | |
html_source = html_source.replace(/\@([^\n\s]*)/ig, "<blade $1/>"); | |
... | |
sweet_code = sweet_code.replace(/<blade ([^\n]*)\/>/ig, "@$1"); | |
sweet_code = sweet_code.replace(/\(\ \'/ig, "('"); | |
... |
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
#!/bin/bash | |
## create user group | |
sudo groupadd laravel | |
## add current user to group | |
sudo usermod -a -G www-data $USER | |
## add web server to group | |
sudo usermod -a -G www-data laravel |
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
# This is a sample build configuration for PHP. | |
# Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples. | |
# Only use spaces to indent your .yml configuration. | |
# ----- | |
# You can specify a custom docker image from Docker Hub as your build environment. | |
image: phpunit/phpunit:5.0.3 | |
pipelines: | |
default: | |
- step: |
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
export function getHttpAuth(backend: ConnectionBackend, defaultOptions: RequestOptions, storage: Storage) { | |
return new HttpAuth(backend, defaultOptions, storage); | |
} | |
@NgModule({ | |
... | |
providers: [ | |
{ |
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 { Response, RequestOptions, ConnectionBackend } from '@angular/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import { Storage } from '@ionic/storage'; | |
import { HttpAuthInterceptor, InterceptorConfig } from './http-auth-interceptor'; | |
export class HttpAuth extends HttpAuthInterceptor { | |
// In production code do not put your API keys here make sure they are obtained some other way. | |
// perhaps a env variables. |
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 { Http, Request, RequestOptions, RequestOptionsArgs, Response, ConnectionBackend, Headers } from "@angular/http"; | |
import { Observable } from "rxjs/Observable"; | |
import "rxjs/add/observable/fromPromise"; | |
import "rxjs/add/operator/mergeMap"; | |
export interface InterceptorConfigOptional { | |
headerName?: string; | |
headerPrefix?: string; | |
noTokenError?: boolean; | |
} |
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
/** | |
* How to implement cordova-background-geolocation with Ionic 2 / 3 | |
* https://github.com/transistorsoft/cordova-background-geolocation-lt | |
* Chris Scott, Transistor Software <[email protected]> | |
*/ | |
import { Component } from '@angular/core'; | |
import { NavController, Platform } from 'ionic-angular'; |
NewerOlder