Skip to content

Instantly share code, notes, and snippets.

View osamaqarem's full-sized avatar

Osama Qarem osamaqarem

View GitHub Profile
@osamaqarem
osamaqarem / Accordion.tsx
Last active August 20, 2023 17:47
Accordion.tsx
import * as React from 'react';
import { LayoutAnimation, Pressable, PressableProps } from 'react-native';
type ChildrenOrRenderProp = React.ReactNode | ((mode: Context['mode']) => React.ReactNode);
type RewriteChildren<PropsType = Record<string, unknown>> = React.FC<
Omit<PropsType, 'children'> & { children?: ChildrenOrRenderProp }
>;
interface Context {
@osamaqarem
osamaqarem / ng.fish
Last active June 19, 2024 04:43
fish functions: start ngrok and copy url to clipboard
function ng --description "ng <port>"
if test -z "$argv[1]"
set port 3000
else
set port $argv[1]
end
# Run ngrok in the background
ngrok http $port > /dev/null &
@osamaqarem
osamaqarem / CircularProgressBar.java
Created August 20, 2023 15:23
Android: Overlay with Circle Cutout ViewGroup
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.View;