Skip to content

Instantly share code, notes, and snippets.

View qodirovshohijahon's full-sized avatar
🇺🇿
Focusing

Shokhijakhon Kodirov qodirovshohijahon

🇺🇿
Focusing
View GitHub Profile
@qodirovshohijahon
qodirovshohijahon / .zshrc
Created October 25, 2022 06:31 — forked from Gram21/.zshrc
Standard .zshrc files
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="gnzh"
# Texteditor and zshconfig aliases
@qodirovshohijahon
qodirovshohijahon / .zshrc
Created October 25, 2022 06:31 — forked from zanshin/.zshrc
My .zshrc file
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="zanshin"
export const myQuizList = async (
req: IRequest,
res: Response,
next: NextFunction
) => {
try {
const quizRepo = await quizRepository()
const user: any = req.sessionData?.user
console.log('-----------', req.sessionData)
if (!user) {
@qodirovshohijahon
qodirovshohijahon / test.html
Created August 7, 2020 11:33
Bu masala yechimi
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
</head>
<body>
<h1>Hello wordl</h1>
</body>
@qodirovshohijahon
qodirovshohijahon / js_show_current_time.html
Created July 16, 2020 05:01
You can see current time
<!DOCTYPE html>
<html>
<head>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
export const update = async (
req: Request,
res: Response,
next: NextFunction
) => {
try {
const id: string = req.params.id
const data = req.body
const topicRepo = await topicRepository()
const topic = await topicRepo.findOne({ id })
@qodirovshohijahon
qodirovshohijahon / topicCRUD_v_1.js
Created July 13, 2020 11:44
int_backend_v_1_topic_CRUD
import { Request, Response, NextFunction } from 'express'
import { getManager, Repository } from 'typeorm'
import { ApiResponse } from '@shared/lib/ApiResponse'
import { categoryRepository, topicRepository } from '@repository/'
import { Topic } from '@entities/Topic'
export const create = async (
req: Request,
res: Response,
next: NextFunction
@qodirovshohijahon
qodirovshohijahon / topicCRUD_v_1.ks
Created July 13, 2020 11:42
int_backend_TOPIC_CRUD
import { Request, Response, NextFunction } from 'express'
import { getManager, Repository } from 'typeorm'
import { ApiResponse } from '@shared/lib/ApiResponse'
import { categoryRepository, topicRepository } from '@repository/'
import { Topic } from '@entities/Topic'
export const create = async (
req: Request,
res: Response,
next: NextFunction
function insert(arr) {
for(let i = 1; i < arr.length; i++) {
let key = arr[i];
let j = i - 1;
while(j >= 0 && arr[j] > key) {
arr[j+1] = arr[j];
j--;
}
arr[j+1] = key;
@qodirovshohijahon
qodirovshohijahon / palindrom_integer_v_0.1.js
Created February 6, 2020 08:59
In this example you can see solving palindrom numbers in another way.
/**
* @param {number} x
* @return {boolean}
*/
var isPalindrome = function(x) {
let sum = 0, n, m = x;
if (x < 0) return false;
while (x != 0 ) {
sum = sum * 10 + x % 10;;
x = Math.floor (x / 10);