Skip to content

Instantly share code, notes, and snippets.

View 9paradox's full-sized avatar
🕷️
hey everyone!

Akshay Gaonkar 9paradox

🕷️
hey everyone!
View GitHub Profile
@9paradox
9paradox / ml-kit-labels-for-default-model.json
Last active June 15, 2021 18:14
ML Kit label converted to JSON. ML Kit Image Labeling: labels for default model. The default model provided with the Image Labeling API supports 400+ different labels. [ML kit](https://developers.google.com/ml-kit/vision/image-labeling/label-map)
[
{
"id": "0",
"text": "Team"
},
{
"id": "1",
"text": "Bonfire"
},
{
@9paradox
9paradox / ImageKitService.php
Created May 30, 2021 14:31
ImageKit folder delete function
//https://docs.imagekit.io/api-reference/media-api/delete-folder
public function deleteFolder($folderPath)
{
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.imagekit.io/v1/folder/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@9paradox
9paradox / usePartialState.tsx
Last active September 24, 2024 12:40
Easy to use Generic Typescript React custom Hook for Handling multiple inputs and saving state for properties of type or object.
import react, { useState } from "react";
const usePartialState = <T extends Partial<T>>(): [T | {}, (fieldName: string, value: any) => void, (state: T) => void] => {
const [state, setState] = useState<T | {}>({});
const setStateByFiled = (fieldName: string, value: any) => {
setState(_s => {
return {
..._s,
[fieldName]: value,
@9paradox
9paradox / GoogleMapAPI_DraggableMarker.html
Last active May 5, 2018 16:24
Get Position on Map using lat/lang with a draggable marker (Google Map API v3)
<style>
#map-canvas{
height: 500px;
width: 500px;
border: 3px solid black;
}
</style>
<br>
<br>
<input type="text" id="latitude" value="15.6002">
@9paradox
9paradox / HorizontalForm.html
Last active May 5, 2018 16:57
Simple Horizontal Form using css. Align Label and Input Horizontally.
<html>
<head>
<style>
.text-center {
text-align: center;
}
.page {
margin: 10px auto;