Skip to content

Instantly share code, notes, and snippets.

@wakaztahir
wakaztahir / recaptcha-verify.go
Created September 4, 2023 14:10
Verify Recaptcha Token In Go
import (
"encoding/json"
"net/http"
"net/url"
)
type RecaptchaResponse struct {
Success bool `json:"success"`
Hostname string `json:"hostname"`
ErrorCodes []string `json:"error-codes"`
@wakaztahir
wakaztahir / TestTextFieldCompose.kt
Created October 13, 2022 17:07
These are my use cases all in one composable for the whole screen
var botShet by remember { mutableStateOf(false) }
var columnOne by remember { mutableStateOf(false) }
if (!botShet) {
Scaffold(
modifier = Modifier.statusBarsPadding(),
bottomBar = {
BottomNavigation {
for (i in 0..4) {
IconButton(onClick = { /*TODO*/ }) {
Icon(imageVector = Icons.Default.Check, contentDescription = null)
@wakaztahir
wakaztahir / sync-cheat-sheet.md
Last active May 8, 2021 09:04
Sync Cheat Sheet

Sync Cheat Sheet

  • LocalFileEditTime = Time at which file was modified in local
  • CloudFileEditTime = Time at which file was modified in cloud
  • FileCloudId = Cloud ID of file

Download (if not permanently deleted)

  • Download & Insert if FileCloudId is not found in local database
  • Download & Update if LocalFileEditTime < CloudFileEditTime