This file contains 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
{ | |
"language": "android", | |
"jdk": "oraclejdk8", | |
"android": { | |
"components": [ | |
"tools", | |
"tools", | |
"platform-tools", | |
"build-tools-24.0.2", | |
"android-19", |
This file contains 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
# Tutorial here: https://medium.com/@harmittaa/travis-ci-android-example-357f6e632fc4 | |
language: android | |
sudo: required | |
jdk: oraclejdk8 | |
before_cache: | |
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ |
This file contains 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
Cyber Security Base - Course Project I | |
I made a web application to which users can register and login to submit comments. | |
Logged in users can logout, view their own profile, delete their own comments and | |
delete their account as well as create new comments. | |
The application includes five different security flaws from the OWASP’s 2013 10 Most Critical Web Application Security Risks | |
list (https://www.owasp.org/index.php/Top_10_2013-Top_10). The flaws are as follows: | |
A2 - Broken Authentication and Session Management | |
A3 - Cross-Site Scripting (XSS) |
This file contains 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
// full tutorial here: | |
// https://medium.com/@harmittaa/setting-camera-focus-mode-for-vuforia-arcamera-in-unity-6b3745297c3d | |
using UnityEngine; | |
using System.Collections; | |
using Vuforia; | |
public class CameraFocusController: MonoBehaviour { | |
// code from Vuforia Developer Library |
This file contains 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 android.content.Context | |
import android.content.SharedPreferences | |
import org.koin.android.ext.koin.androidContext | |
import org.koin.dsl.module | |
val prefModule = module { | |
single { ExamplePreferences(androidContext()) } | |
} | |
class ExamplePreferences(context: Context) { |
This file contains 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 androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import com.github.harmittaa.koinexample.R | |
import com.github.harmittaa.koinexample.fragment.ExampleFragment | |
import com.github.harmittaa.koinexample.persistence.ExamplePreferences | |
import org.koin.android.ext.android.inject | |
class MainActivity : AppCompatActivity() { | |
private val preferences: ExamplePreferences by inject() | |
private val exampleFragment: ExampleFragment by inject() |
This file contains 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 android.os.Bundle | |
import android.util.Log | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.fragment.app.Fragment | |
import androidx.lifecycle.Observer | |
import com.github.harmittaa.koinexample.R | |
import org.koin.androidx.viewmodel.ext.android.viewModel | |
import org.koin.dsl.module |
This file contains 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 androidx.lifecycle.MutableLiveData | |
import androidx.lifecycle.ViewModel | |
import com.github.harmittaa.koinexample.persistence.ExamplePreferences | |
import org.koin.dsl.module | |
val viewModelModule = module { | |
factory { ExampleViewModel(get()) } | |
} | |
class ExampleViewModel(preferences: ExamplePreferences) : ViewModel() { |
This file contains 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 com.github.harmittaa.koinexample.BuildConfig | |
import okhttp3.OkHttpClient | |
import org.koin.dsl.module | |
import retrofit2.Retrofit | |
import retrofit2.converter.gson.GsonConverterFactory | |
val networkModule = module { | |
factory { AuthInterceptor() } | |
factory { provideOkHttpClient(get()) } | |
factory { provideForecastApi(get()) } |
OlderNewer