- Python 3
- Pip 3
$ brew install python3
// | |
// OIDExternalUserAgentIOSSafariViewController.swift | |
// Hugin | |
// | |
// Created by Umut Genlik on 12/7/18. | |
// Taken from https://gist.github.com/WilliamDenniss/18f3779b4a310361bb955cf4e534f29c | |
import UIKit | |
import SafariServices |
open class BaseRepository{ | |
suspend fun <T : Any> safeApiCall(call: suspend () -> Response<T>, errorMessage: String): T? { | |
val result : Result<T> = safeApiResult(call,errorMessage) | |
var data : T? = null | |
when(result) { | |
is Result.Success -> | |
data = result.data |
package com.tinmegali.daggerwithkotlin.room | |
import android.arch.persistence.room.Database | |
import android.arch.persistence.room.RoomDatabase | |
import android.arch.persistence.room.TypeConverters | |
import com.tinmegali.daggerwithkotlin.room.daos.NoteDAO | |
import com.tinmegali.daggerwithkotlin.room.daos.UserDAO | |
import com.tinmegali.daggerwithkotlin.room.entities.Note | |
import com.tinmegali.daggerwithkotlin.room.entities.User |
private class HttpInterceptor implements Interceptor { | |
@Override | |
public Response intercept(Chain chain) throws IOException { | |
Request request = chain.request(); | |
//Build new request | |
Request.Builder builder = request.newBuilder(); | |
builder.header("Accept", "application/json"); //if necessary, say to consume JSON | |
#!/bin/bash | |
export PATH=$PATH:${ANDROID_SDK_PATH}/tools | |
USER="your proxy-user" | |
PASS="your proxy-password " | |
PROXY_HOST="your proxy-host" | |
PROXY_PORT="your proxy-port" | |
expect -c " | |
spawn android update sdk -u -s --proxy-host ${PROXY_HOST} --proxy-port ${PROXY_PORT} |
apply plugin: 'com.android.library' | |
apply plugin: 'com.jfrog.artifactory' | |
apply plugin: 'maven-publish' | |
def packageName = 'codeinputlib' | |
def libraryVersion = '1.0.0' | |
buildscript { | |
repositories { | |
jcenter() |
// | |
// Jenkins Job DSL example to create build projects for Bitbucket branches | |
// | |
// Imports | |
import java.text.DateFormat | |
import java.text.SimpleDateFormat | |
import groovy.time.TimeCategory | |
// URL components |
// URL components | |
String baseUrl = "https://bitbucket.org/rest/api" | |
String version = "1.0" | |
String project = "SYS" | |
// Put it all together | |
String reposUrl = [baseUrl, version, "projects", project, "repos"].join("/") | |
def send_request(url_string){ | |
// Create URL |
Some Jenkinsfile examples |