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
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
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
enum Regioni: String, PostgreSQLRawEnum { | |
static let allCases: [Regioni] = [ | |
abruzzo, | |
basilicata, | |
calabria, | |
campania, | |
emiliaromagna, | |
friuliveneziagiulia, | |
lazio, | |
liguria, |
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
enum Comuni: String { | |
static let allCases: [Comuni] = [ | |
abanoterme, | |
abbadiacerreto, | |
abbadialariana, | |
abbadiasansalvatore, | |
abbasanta, | |
abbateggio, | |
abbiategrasso, | |
abetone, |
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
enum Provincie: String { | |
static let allCases: [Provincie] = [ | |
AG, | |
AL, | |
AN, | |
AO, | |
AR, | |
AP, | |
AT, | |
AV, |
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
@Throws(Exception::class) | |
fun Realm.exportDatabase(context: Context) { | |
val path = "${Environment.getExternalStorageDirectory().path}/${this.configuration.realmFileName}" | |
val file = File(path) | |
if (file.exists()) { | |
file.delete() | |
} | |
this.writeCopyTo(file) | |
this.close() | |
val uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", file) |
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.view.ViewGroup | |
import androidx.recyclerview.widget.RecyclerView | |
abstract class SectionAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>() { | |
private val headerPositions: MutableMap<Int, Int> = mutableMapOf() | |
private val itemPositions: MutableMap<Int, Int> = mutableMapOf() | |
private val sectionItemPositions: MutableMap<Int, Int> = mutableMapOf() | |
private var listSize = 0 | |
private var headerSize = 0 |
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
<?php | |
/** | |
* Plugin Name: Name Of The Plugin | |
* Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates | |
* Description: A brief description of the Plugin. | |
* Version: The Plugin's Version Number, e.g.: 1.0 | |
* Author: Name Of The Plugin Author | |
* Author URI: http://URI_Of_The_Plugin_Author | |
* License: A "Slug" license name e.g. GPL2 | |
*/ |
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
ssh-keygen -t rsa -b 4096 -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
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
/** | |
* Disables the SSL certificate checking for new instances of {@link HttpsURLConnection} This has been created to | |
* aid testing on a local box, not for use on production. | |
*/ | |
private static void disableSSLCertificateChecking() { | |
TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { | |
public X509Certificate[] getAcceptedIssuers() { | |
return null; | |
} |
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
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2016 Raphaël Bussa | |
* | |
* 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 |
NewerOlder