Skip to content

Instantly share code, notes, and snippets.

View nghiatv's full-sized avatar
Working from cafe

Nghĩa nghiatv

Working from cafe
View GitHub Profile
@nghiatv
nghiatv / gist:e226dd906cb627be3759ae8c6b8ecacf
Created December 4, 2024 03:37
usePushNotification.ts
/* eslint-disable react-hooks/exhaustive-deps */
import {REGISTER_NOTIFICATION_TOKEN} from '@/apollo/mutations/notification';
import {isApolloError, useMutation} from '@apollo/client';
import {useCallback} from 'react';
import {
registerNotificationToken,
registerNotificationTokenVariables,
} from '__generated__/registerNotificationToken';
import {useMMKV, useMount} from './index';
import CleverTap from 'clevertap-react-native';
index
@nghiatv
nghiatv / index.php
Created December 9, 2015 04:25
bai tap can bac n
<?php
function can(float $num, int $lvl): float{
$lvl = 1/$lvl;
$num = pow($num, $lvl);
return $num;
}
echo can(27, 5);
?>