Automatically increment the build number every time the project is compiled.
- Select your target in your Xcode project
- Select the Build Phases tab
- Add a New Run Script Phase entry (via the + sign)
- Copy the snippet below into the shell editor
| import {Injectable} from "@angular/core"; | |
| import {Device} from 'ionic-native'; | |
| declare var cordova : any; | |
| var PUSHWOOSH_APP_ID = 'XXXXX-XXXXX'; | |
| var GOOGLE_PROJECT_NUMBER = 'XXXXXXXXXXXXX'; | |
| // For iOS, open your project .pList file in xCode and add: | |
| // 1) "Pushwoosh_APPID" key with the Pushwoosh App Id value |
| import {Componente} from '@angular/core'; | |
| import {Platform, ionicBootstrap} from 'ionic-angular'; | |
| import {PushwooshService} from './services/pushwoosh.service'; | |
| @Component({ | |
| template: '<ion-nav [root]="rootPage" #ionNav></ion-nav>', | |
| }) | |
| export class MyApp { | |
| constructor(private platform:Platform, |
| // derived from https://www.veasoftware.com/posts/uipageviewcontroller-in-swift-xcode-62-ios-82-tutorial | |
| import UIKit | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| var window: UIWindow? | |
| func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
| window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
| window!.rootViewController = ViewController() |
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { Provider } from 'react-redux'; | |
| import store from './store'; | |
| const rootEl = document.getElementById('root'); | |
| // Create a reusable render method that we can call more than once | |
| let render = () => { | |
| // Dynamically import our main App component, and render it |
#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!
I hope it helps you too!
fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup
| class PeekingLinearLayoutManager : LinearLayoutManager { | |
| @Suppress("Unused") | |
| @JvmOverloads | |
| constructor(context: Context?, @RecyclerView.Orientation orientation: Int = RecyclerView.VERTICAL, reverseLayout: Boolean = false) : super(context, orientation, reverseLayout) | |
| @Suppress("Unused") | |
| constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) | |
| override fun generateDefaultLayoutParams() = | |
| scaledLayoutParams(super.generateDefaultLayoutParams()) |
The tutorial got a new home, head over to the newly created repo (for more flexibility and better interaction).
| # Laravel queue worker using systemd | |
| # ---------------------------------- | |
| # | |
| # /lib/systemd/system/queue.service | |
| # | |
| # run this command to enable service: | |
| # systemctl enable queue.service | |
| [Unit] | |
| Description=Laravel queue worker |
| stages: | |
| - build | |
| - deploy | |
| build: | |
| stage: build | |
| tags: | |
| - <tag you provided while registering the token> | |
| - <second tag> | |
| script: | |
| - echo "Building deploy package" |