Skip to content

Instantly share code, notes, and snippets.

View ae5259's full-sized avatar
🦀

ь ae5259

🦀
View GitHub Profile
@ae5259
ae5259 / mrazi.js
Created March 12, 2023 14:33
idk how
// by https://t.me/shakhzodme
[][
(![] + [])[+[]] + (![] + [])[!+[] + !+[]] + (![] + [])[+!+[]] +
(!![] + [])[+[]]
][
([][
(![] + [])[+[]] + (![] + [])[!+[] + !+[]] + (![] + [])[+!+[]] +
(!![] + [])[+[]]
] + [])[!+[] + !+[] + !+[]] +
nums = list(range(20))
evens = [num for num in nums if num%2==0]
odds = [num for num in nums if num%2!=0]
print(evens)
print(odds)
print(sum(evens))
print(sum(odds))
@ae5259
ae5259 / nums.ts
Last active March 16, 2023 15:02
function sums(nums: number[]): {odds: number, evens: number} {
let odds: number = 0
let evens: number = 0
for(let num of nums) {
if(num%2==0) evens += num;
else odds += num;
}
return { odds, evens };
{
"workbench.colorTheme": "JetBrains Darcula Theme",
"editor.fontFamily": "'jetbrains mono', monospace",
"editor.fontSize": 20,
"window.zoomLevel": 1
}
use std::{
env,
fs::{self, File},
path::Path,
};
pub fn config() {
let config_path = format!(
"/home/{}/.xonfig/",
env::var("LOGNAME").unwrap_or(".config".to_owned())
@ae5259
ae5259 / color.ts
Created October 17, 2023 03:04
Some colors to use on CLI app with Deno.
export default {
"red": "\x1b[31m%s\x1b[0m",
"blue": "\x1b[36m%s\x1b[0m",
"purple":"\x1b[35m%s\x1b[0m",
"green":"\x1b[32m%s\x1b[0m",
"yellow":"\x1b[33m%s\x1b[0m",
}
@ae5259
ae5259 / may
Created October 25, 2023 11:17
May(Umar Hayyom)
Bir qo'lda Qur'onu bittasida jom,
Ba'zida halolmiz, ba'zida harom,
Feruza gumbazli osmon ostida
Na chin musulmonmiz, na kofir tamom.
Men keldimu, dunyo ko'rdimi foyda?
Ketsam martabasi osharmi? Qayda!
Hech kim tushuntirib bera olmadi:
Kelishim - ketishim sababi qayda.
@ae5259
ae5259 / http_request.go
Created January 21, 2024 03:59
Read dynamic or unknown JSON response.
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
@ae5259
ae5259 / bot.ts
Created February 20, 2024 11:48
Bot
import { MyContext, MyConversation } from "../config/bot.ts";
import { createConversation } from "https://deno.land/x/[email protected]/conversation.ts";
import { bot } from "../config/index.ts";
import { InlineKeyboard } from "../deps.ts";
const kv = await Deno.openKv()
const ADMIN = "5317740617"
const GROUP = "-4124723873"
async function meme(conversation: MyConversation, ctx: MyContext) {
@ae5259
ae5259 / envread.go
Created March 21, 2024 12:07
My own .env reader function.
package utils
import (
"fmt"
"os"
"strings"
)
func ReadENV(key string) (value string) {
var result string