This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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); |
NewerOlder