Skip to content

Instantly share code, notes, and snippets.

View florina-muntenescu's full-sized avatar

Florina Muntenescu florina-muntenescu

  • Google
  • London, United Kingdom
View GitHub Profile
@florina-muntenescu
florina-muntenescu / build.gradle.kts
Created July 2, 2021 15:29
Proto DataStore config in Gradle Kotlin DSL
/* Copyright 2021 Google LLC.
SPDX-License-Identifier: Apache-2.0 */
import com.google.protobuf.gradle.*
plugins {
// find latest version number here:
// https://mvnrepository.com/artifact/com.google.protobuf/protobuf-gradle-plugin
id("com.google.protobuf") version "0.8.16"
...
@florina-muntenescu
florina-muntenescu / pre-commit
Created June 24, 2018 22:26
Pre-commit hooks
#!/bin/sh
#
# Add hook scripts to be run before every commit.
# This is called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook save this file in your repo .git/hooks folder
# clean and run tests
@florina-muntenescu
florina-muntenescu / CustomTypefaceSpan.kt
Last active May 27, 2024 02:46
Style internationalized text using Annotations
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@florina-muntenescu
florina-muntenescu / BaseDao.kt
Last active September 28, 2023 15:01
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software