Skip to content

Instantly share code, notes, and snippets.

View creativedrewy's full-sized avatar

Andrew Watson creativedrewy

View GitHub Profile
@creativedrewy
creativedrewy / LoadingPreferenceRow.kt
Last active July 24, 2019 21:28
## Indeterminate Progress Bar on Android Preferences Screen
package com.your.package.structure.here
/**
* Custom Preference that provides an indeterminate progress bar for showing loading/long-running operations.
* Set checked to to "true" to show the progress bar and "false" to hide it.
*/
class LoadingPreferenceRow constructor(
context: Context, attrs: AttributeSet? = null
): SwitchPreference(context, attrs) {
@creativedrewy
creativedrewy / 07-24-19-link.md
Created July 24, 2019 21:28
## Semantic UI for React
@creativedrewy
creativedrewy / RoundedDiamondFabShape.kt
Created August 2, 2021 22:54
Diamond-shaped FAB with rounded corners. Extends Shape interface for FAB background and cutout.
import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Outline
import androidx.compose.ui.graphics.Path
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.LayoutDirection
class RoundedDiamondFabShape(
@creativedrewy
creativedrewy / gltf-export.py
Created August 30, 2022 18:05
Bake image textures and export GLB using bake
from cmath import exp
import bpy
##### :: Script-Specific Functions :: #####
def deselect_all():
bpy.ops.object.select_all(action='DESELECT')
def active_object(name):
print(name)
@creativedrewy
creativedrewy / App.tsx
Created November 20, 2023 19:50
R3f Native Orbit Controls Test
import {Canvas, MeshProps, useFrame, useLoader} from "@react-three/fiber/native"
// import useControls from "r3f-native-orbitcontrols"
import { useRef, useState } from "react"
import { View } from "react-native"
import { GLTFLoader } from "three-stdlib";
import { Suspense } from "react";
import { useGLTF } from '@react-three/drei/native'
import useControls from "r3f-native-orbitcontrols";
export default function App() {
{
"usd_conversions": [
{
"name": "INR",
"rate": 80.0
},
{
"name": "EUR",
"rate": 0.92
}