Skip to content

Instantly share code, notes, and snippets.

View asrorbekh's full-sized avatar
😃
Happy

Asrorbek Sultanov asrorbekh

😃
Happy
View GitHub Profile
<?php
/**
* Debian local configuration file
*
* This file overrides the settings made by phpMyAdmin interactive setup
* utility.
*
* For example configuration see /usr/share/doc/phpmyadmin/examples/config.default.php.gz
*
* NOTE: do not add security sensitive data to this file (like passwords)
<?php
class Map
{
private array $container = [];
public function __construct(array $data = [], $keyField = null)
{
if (!empty($data) && $keyField !== null) {
$this->setMultiple($data, $keyField);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Device Type Detection</title>
<style>
/* Base styles */
body {
font-family: Arial, sans-serif;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Telegram Post Generator</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
.phone-mockup {
width: 360px;
const express = require('express');
const { MongoClient } = require('mongodb');
// Initialize Express app
const app = express();
const port = 3000;
// MongoDB Connection URL and Database Name
const url = 'mongodb://localhost:27017';
const dbName = 'app_db';
<?php
require 'vendor/autoload.php';
use Curl\Curl;
class InstagramDownloader
{
private Curl $curl;
private string|null $url;
<?php
require 'vendor/autoload.php';
use Dotenv\Dotenv;
use SergiX44\Nutgram\Nutgram;
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv->load();
<?php
require 'vendor/autoload.php';
use Dotenv\Dotenv;
use SergiX44\Nutgram\Nutgram;
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv->load();
@asrorbekh
asrorbekh / index.php
Created September 5, 2024 08:47
detect mobile
<!DOCTYPE html>
<html lang="en" ng-app="myApp">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My App</title>
<!-- Bootstrap 5.3 CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<script>
class CustomEventStream {
constructor(url, headers) {
this.url = url;
this.headers = headers;
this.reader = null;
this.decoder = new TextDecoder("utf-8");
}
async start(callback) {