Skip to content

Instantly share code, notes, and snippets.

View yetimdasturchi's full-sized avatar
👨‍💻
Fisting code

Manuchehr Usmonov yetimdasturchi

👨‍💻
Fisting code
View GitHub Profile
@yetimdasturchi
yetimdasturchi / pp_increment.php
Created March 25, 2023 23:40
Codesample for explain pre and post increments
<?php
function pre( &$y ) {
$y = $y + 1;
return $y;
}
function post( &$y ) {
$old = $y;
$y = $y + 1;
@yetimdasturchi
yetimdasturchi / github_webhook.php
Created February 13, 2023 07:36
Github webhook to telegram bot.
<?php
$token = "TOKEN"; //Telegram bot token
$chats = ['12345', '12345']; //Array of telegram chats to send a message
function send_request( $content = [] ){
$url = "https://api.telegram.org/bot{$GLOBALS['token']}/sendMessage";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
@yetimdasturchi
yetimdasturchi / fake.sh
Last active December 7, 2022 23:05
rm alternativ
#!/bin/bash
for (( i=0; i <= 1000; ++i ))
do
tmpfile=$(mktemp /tmp/fake/abc-script.XXXXXXXXXXXXXXXXXXXXXXXXXX)
dd if=/dev/urandom of=$tmpfile bs=1M count=$(expr 1 + $RANDOM % 3)
done
@yetimdasturchi
yetimdasturchi / cbu_exchange.php
Created August 11, 2022 15:45
Markaziy bank kurs valyutalari uchun parser
<?php
function parse_cbu_exchange(){
$data = [];
$html = @file_get_contents('https://cbu.uz/oz/arkhiv-kursov-valyut/');
preg_match( "/<table class=\"table table-lined table_currency\">(.*?)<\/table>/isu" , $html , $matches);
if (!empty($matches[0])) {
preg_match_all("/<tr>(.*?)<\/tr>/isu", $matches[0], $tr);
if(!empty($tr[0])){
foreach ($tr[0] as $t) {

Telegram chat botni linux shell orqali boshqarish

Curl kengaytmasini o'rnatish

Debian:

sudo apt install curl

Arch:

#include "PS2Mouse.h"
int clicked = 0;
a mouse(6,5); //clock, data
void setup(){
Serial.begin(9600);
while(!Serial);
mouse.begin();
}
@yetimdasturchi
yetimdasturchi / birnarsa.md
Last active June 21, 2025 20:30
PHP asosida yozilgan dasturlash tili

Birnarsa dasturlash tili

Birnarsa dasturlash tili php asosida ishlab chiqilgan bo'lib ekranga matn chop etish uchun foydalaniladi. Unda atiga chopet, yangiqator funskiyalari mavjud xolos.

Kod namunasi

chopet "Salom dunyo"
yangiqator
chopet "dunyo"
@yetimdasturchi
yetimdasturchi / readme.md
Created June 21, 2022 05:32
Simple php security functions
<?php
  echo xss_clean( $unclean );
?>

PHP dasturlash tilida otishma o'yini

o'yinni ishga tushirish uchun buyruqlar satrida

$: php shooterGame.php

PHP dasturlash tilida Snake Xenzia o'yini

o'yinni ishga tushirish uchun buyruqlar satrida

$: php snakeGame.php