Skip to content

Instantly share code, notes, and snippets.

View engr-kishon's full-sized avatar
🎯
Focusing

Kishon Kumar Pashi engr-kishon

🎯
Focusing
View GitHub Profile
import 'dart:async';
import 'dart:convert';
import 'dart:developer';
import 'package:web_socket_channel/web_socket_channel.dart';
import 'message.dart';
class WebSocketDisconnectInfo {
final int? code;
final String? reason;
@engr-kishon
engr-kishon / main.js
Created April 3, 2025 05:10
Eleven Labs
import Fastify from "fastify";
import WebSocket from "ws";
import dotenv from "dotenv";
import fastifyFormBody from "@fastify/formbody";
import fastifyWs from "@fastify/websocket";
import Twilio from "twilio";
// Load environment variables from .env file
dotenv.config();
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:wifi_shield/app/core/values/colors.dart';
import 'package:wifi_shield/app/modules/speed_test/speed_test_controller.dart';
class SpeedChart extends StatelessWidget {
const SpeedChart({super.key});
SpeedTestController get speedTestController =>
<?php
class AuthController extends Controller
{
// Logout
public function logout(Request $request): JsonResponse
{
if (auth()->user()->tokens()->delete()) {
return response()->json(['message' => 'Logged out'], 201);
// Create donut sections
List<DonutSection> donutSections = new ArrayList<>();
donutSections.add(new DonutSection("Food", Color.parseColor("#6979F8"), 2f));
donutSections.add(new DonutSection("Shopping", Color.parseColor("#FFCF5C"), 0.5f));
donutSections.add(new DonutSection("Rent", Color.parseColor("#D48CF6"), 1f));
donutSections.add(new DonutSection("Other", Color.parseColor("#FF98A8"), 0.5f));
// Set data to donut chart
donutView.submitData(donutSections)