This file contains hidden or 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/python | |
# pip install polyline | |
import polyline | |
def rreplace(s, old, new, count): | |
return (s[::-1].replace(old[::-1], new[::-1], count))[::-1] |
This file contains hidden or 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.LiveData | |
import bolts.Task | |
import com.parse.ParseObject | |
import com.parse.ParseQuery | |
import kotlin.coroutines.resume | |
import kotlin.coroutines.resumeWithException | |
import kotlin.reflect.KProperty | |
import kotlinx.coroutines.* | |
suspend fun <T> Task<T>.await(): T { |
This file contains hidden or 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
fun <T : ParseObject, VH : ViewDataBinding> RecyclerView.bind( | |
query: ParseQuery<T>, | |
@LayoutRes layout: Int = 0, | |
lifecycleOwner: LifecycleOwner | |
): ParseRecyclerAdapter<T, VH> { | |
val parseAdapter = ParseRecyclerAdapter<T, VH>(query, layout, lifecycleOwner) | |
layoutManager = LinearLayoutManager(context) | |
adapter = parseAdapter | |
return parseAdapter | |
} |
This file contains hidden or 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
; PlatformIO Project Configuration File | |
; | |
; Build options: build flags, source filter | |
; Upload options: custom upload port, speed and extra flags | |
; Library options: dependencies, extra library storages | |
; Advanced options: extra scripting | |
; | |
; Please visit documentation for the other options and examples | |
; https://docs.platformio.org/page/projectconf.html |
This file contains hidden or 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
@Composable | |
fun PhoneNumberConsent( | |
onPhoneNumberFetchedFromDevice: (phoneNumber: String) -> Unit, | |
) { | |
val context = LocalContext.current | |
val phoneNumberHintIntentResultLauncher = | |
rememberLauncherForActivityResult(ActivityResultContracts.StartIntentSenderForResult()) { result -> | |
try { | |
val phoneNumber = Identity.getSignInClient(context).getPhoneNumberFromIntent(result.data) |
This file contains hidden or 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
# documentation: https://supabase.io | |
# slogan: The open source Firebase alternative. | |
# tags: firebase, alternative, open-source | |
# minversion: 4.0.0-beta.228 | |
# logo: svgs/supabase.svg | |
# port: 8000 | |
services: | |
supabase-kong: | |
image: kong:2.8.1 |