Contract Killer
The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
{ "urlname": "YOUR URL PATH here, for https://www.meetup.com/swmobile the urlname is swmobile" } |
import org.assertj.core.api.AbstractObjectAssert | |
@Suppress("UNCHECKED_CAST") | |
inline fun <reified R> AbstractObjectAssert<*, *>.isNotInstanceOf(): AbstractObjectAssert<*, *>? = | |
isNotInstanceOf(R::class.java) | |
@Suppress("UNCHECKED_CAST") | |
inline fun <reified R> AbstractObjectAssert<*, *>.isInstanceOf(): AbstractObjectAssert<*, *>? = | |
isInstanceOf(R::class.java) |
package ${PACKAGE_NAME} | |
import com.nhaarman.mockitokotlin2.verify | |
import com.nhaarman.mockitokotlin2.whenever | |
import org.assertj.core.api.Assertions.assertThat | |
import org.junit.Before | |
import org.junit.Test | |
import org.junit.runner.RunWith | |
import org.mockito.Mock | |
import org.mockito.junit.MockitoJUnitRunner |
name: Build and Deploy to Firebase | |
'on': | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_deploy: | |
name: Build and deploy Jekyll site | |
runs-on: ubuntu-latest | |
class MyAppFirebaseMessagingService : FirebaseMessagingService() { | |
override fun onMessageReceived(remoteMessage: RemoteMessage) { | |
if(remoteMessage.data.isNotEmpty()) { | |
processNewMessage(remoteMessage.data) | |
} | |
} | |
private fun processNewMessage(remoteMessageData: Map<String, String>) { | |
if (BeaconPushNotificationsProcessor.isBeaconNotification(remoteMessageData)) { |
package com.scottyab.whatsnewplayground.data | |
import android.content.Context | |
import android.content.SharedPreferences | |
import androidx.security.crypto.EncryptedSharedPreferences | |
import androidx.security.crypto.MasterKeys | |
import com.scottyab.whatsnewplayground.BuildConfig | |
internal class SampleEncPrefs(context: Context) { |
package me.angrybyte.coloringdemo; | |
import static android.graphics.PorterDuff.Mode.SRC_ATOP; | |
import android.annotation.SuppressLint; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.ColorStateList; | |
import android.graphics.Bitmap; |
#!/usr/bin/env bash | |
# exit if fails | |
set -o errexit | |
set -o pipefail | |
# reads the first arg as the file - expected list of file names without extension | |
filename="${1:-}" | |
# loops through each line | |
while read -r line |
#! /usr/bin/env python | |
# coding: utf-8 | |
"""This script reads all .java and .kt files from a directory tree and determines if | |
it's necessary to write a Copyright Notice in the beginning of each Java file. | |
It checks that by searching for the word "copyright" in the first few lines. | |
Warning: use it at your own risk. Better have a source control to rollback if | |
necessary. | |
""" |