Skip to content

Instantly share code, notes, and snippets.

View josphatmwania's full-sized avatar
💭
Abducted by aliens!

Josphat Mwania josphatmwania

💭
Abducted by aliens!
View GitHub Profile
@chepsi
chepsi / gist:2f83b85bbcab08bbc35feba158fd43b2
Created April 23, 2024 09:33
Android254 Canvas Logo.
@Composable
fun InstagramLogo() {
Canvas(
modifier = Modifier
.size(200.dp)
.clip(RoundedCornerShape(10.dp))
) {
val width = size.width
val height = size.height
drawRoundRect(brush = InstaGradient)
#include <stdio.h>
#include <stdlib.h>
#define da_append(xs, x) \
do { \
if ((xs)->count >= (xs)->capacity) { \
if ((xs)->capacity == 0) (xs)->capacity = 256; \
else (xs)->capacity *= 2; \
(xs)->items = realloc((xs)->items, (xs)->capacity*sizeof(*(xs)->items)); \
} \