Skip to content

Instantly share code, notes, and snippets.

View jeffdgr8's full-sized avatar

Jeff Lockhart jeffdgr8

View GitHub Profile
@jeffdgr8
jeffdgr8 / make-core.sh
Last active August 22, 2024 23:26
Build Couchbase Lite Core binaries for Couchbase Lite Android SDK
#!/bin/sh
# Run from Couchbase Lite Java repo root to generate
# the Android libLiteCore.so binaries in common/lite-core
# https://github.com/couchbase/couchbase-lite-java-ce-root
# Couchbase Lite Core repo location
CORE_REPO_PATH="../couchbase-lite-core"
# Community or Enterprise
@jeffdgr8
jeffdgr8 / CountDownLatch.kt
Last active July 14, 2022 23:57 — forked from konrad-kaminski/CountDownLatch.kt
CountDownLatch naive implementation (updated for kotlinx-coroutines 1.6.4)
package kotlinx.coroutines.experimental.sync
/*
* Copyright 2016-2017 JetBrains s.r.o.
*
* 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
@jeffdgr8
jeffdgr8 / LICENSE
Created September 4, 2018 05:22
This license applies to all public gists. https://gist.github.com/jeffdgr8
MIT License
Copyright (c) 2018 Jeff Lockhart
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
furnished to do so, subject to the following conditions:
import com.brandongogetap.stickyheaders.exposed.StickyHeader
import com.brandongogetap.stickyheaders.exposed.StickyHeaderHandler
import io.github.luizgrp.sectionedrecyclerviewadapter.SectionedRecyclerViewAdapter
/**
* [SectionedRecyclerViewAdapter] that implements [StickyHeaderHandler].
*/
class StickyHeaderSectionedRecyclerViewAdapter: SectionedRecyclerViewAdapter(), StickyHeaderHandler {
override fun getAdapterData(): List<*> {
@jeffdgr8
jeffdgr8 / TimePickerDialogFixedNougatSpinner.java
Last active February 14, 2023 13:15
TimePickerDialog with fixed android:timePickerMode spinner in Nougat
package my.packagename;
import android.app.TimePickerDialog;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.TimePicker;
import java.lang.reflect.Constructor;
@jeffdgr8
jeffdgr8 / SumByColor.js
Last active December 15, 2018 22:25 — forked from clupasq/subByColor.js
function getBackgroundColor(rangeSpecification) {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
return sheet.getRange(rangeSpecification).getBackground();
}
function getForegroundColor(rangeSpecification) {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
return sheet.getRange(rangeSpecification).getFontColor();
}