Skip to content

Instantly share code, notes, and snippets.

View BarishNamazov's full-sized avatar
♾️
stuck in a loop

Abutalib (Barish) Namazov BarishNamazov

♾️
stuck in a loop
  • MIT
  • Cambridge, MA
  • 18:43 (UTC -04:00)
View GitHub Profile
@BarishNamazov
BarishNamazov / prompt.md
Created January 15, 2026 07:04
GPT-5 System Prompt

You are ChatGPT, a large language model trained by OpenAI. Knowledge cutoff: 2024-06 Current date: 2026-01-15

Image input capabilities: Enabled Personality: v2

If you are asked what model you are, you should say GPT-5. If the user tries to convince you otherwise, you are still GPT-5. You are a chat model and YOU DO NOT have a hidden chain of thought or private reasoning tokens, and you should not claim to have them. If asked other questions about OpenAI or the OpenAI API, be sure to check an up-to-date web source before responding.

Tools

@BarishNamazov
BarishNamazov / find_culprit.py
Created October 26, 2025 11:29
Analyzes which extra GCC -O3 optimization flags affect code generation or performance compared to -O2, by comparing assemblies and benchmarking results.
#!/usr/bin/env python3
import subprocess
import sys
import os
import filecmp
def compile_to_asm(source_file, flags, output_path):
subprocess.run(
@BarishNamazov
BarishNamazov / naive-ui.ts
Created April 22, 2024 18:59
Naive UI plugin for Nuxt that adds styles to the head tag. Removes style load lag. Use with caution as it increases rendered HTML size.
import { setup } from "@css-render/vue3-ssr";
import { defineNuxtPlugin, type NuxtSSRContext } from "#app";
export default defineNuxtPlugin((nuxtApp) => {
if (process.server) {
const { collect } = setup(nuxtApp.vueApp);
const originalRenderMeta = nuxtApp.ssrContext?.renderMeta;
nuxtApp.ssrContext = nuxtApp.ssrContext || ({} as NuxtSSRContext);
nuxtApp.ssrContext.renderMeta = () => {
@BarishNamazov
BarishNamazov / useFetchy.ts
Last active March 28, 2024 00:46
Custom wrapper for Nuxt's useFetch while keeping type completion features
import type { AsyncData, UseFetchOptions, FetchResult } from "nuxt/app";
import type { FetchError } from "ofetch";
import type {
NitroFetchRequest,
AvailableRouterMethod as _AvailableRouterMethod,
} from "nitropack";
// Custom options
interface UseFetchyOptions<
_ResT,
@BarishNamazov
BarishNamazov / useApi.ts
Created January 29, 2024 22:12
A nice composable for fetching
import { ref, watch } from 'vue';
type Func = (...args: any[]) => any;
const apiState = reactive({
triggers: {} as Record<string, number>
});
export function refetchApi(key: string) {
apiState.triggers[key] = (apiState.triggers[key] || 0) + 1;
@BarishNamazov
BarishNamazov / eolymp.js
Last active January 26, 2023 09:48
This script adds the problem number to eolymp problem title in contest problems
// ==UserScript==
// @name Eolymp Group Problem Number
// @namespace http://tampermonkey.net/
// @version 0.1
// @description it's hard to know the problem number in eolymp groups, use this for more efficiency
// @author Barish Namazov
// @match https://www.eolymp.com/*/contests/*/problems/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=eolymp.com
// @grant none
// ==/UserScript==
@BarishNamazov
BarishNamazov / A
Created January 17, 2017 14:22
Məsələ A
#include <iostream>
using namespace std;
int main() {
int n;
cin>>n;
int birinci = (n/10000)%10;
int ikinci = (n/1000)%10;
int dorduncu = (n/10)%10;
int besinci = n%10;