Skip to content

Instantly share code, notes, and snippets.

View kimshun0213kr's full-sized avatar

kimshun-fox58 kimshun0213kr

  • Hatoyama,Saitama,JAPAN
  • 08:15 (UTC +09:00)
View GitHub Profile
#include<stdio.h>
int main(void)
{
printf("Hello, world!\n");
return 0;
}
@kimshun0213kr
kimshun0213kr / VSCodeCustom.css
Last active April 20, 2024 12:35
VSCodeCustom.css
.editor-group-watermark > .letterpress{
backgroung-image: url("https://raw.githubusercontent.com/Aikoyori/ProgrammingVTuberLogos/main/VSCode/VSCode-Thick.png") !important;
opacity: .75;
}
import { Box, Center, Flex } from "@chakra-ui/react";
import { Html, Head, Main, NextScript } from "next/document";
export default function Document() {
return (
<Html lang="jp">
<Head />
<body>
<img src="/logo.png" alt={"logo"} width={"50%"} />
<Menu />
export function Menu() {
return (
<Flex
bg="#2C56A0"
w={"100%"}
color={"white"}
position={"sticky"}
top={"0"}
zIndex={"10"}
>
<Flex bg="#2C56A0" w={"100%"} color={"white"}>
<Box w={"25%"}>
<a href="/">
<Box w={"100%"} color="white">
<Center>HOME</Center>
</Box>
</a>
</Box>
<Box w={"25%"}>
<a href="user">
import { useCallback, useEffect, useState } from "react";
import { createHash } from "crypto";
const STORAGE_TOKEN = "storage_token";
const STORAGE_NAME = "storage_name";
const admin_id = process.env.NEXT_PUBLIC_ADMIN_ID;
const admin_password = process.env.NEXT_PUBLIC_ADMIN_PASS;
const user_id = process.env.NEXT_PUBLIC_USER_ID;
const user_password = process.env.NEXT_PUBLIC_USER_PASS;
@kimshun0213kr
kimshun0213kr / index.tsx
Created January 3, 2024 16:17
/src/pages/hash
import { Button } from "@chakra-ui/react";
import { createHash } from "crypto";
import { useState } from "react";
export default function Main() {
const [inputValue, setInputValue] = useState("");
const [hash, setHash] = useState("");
const encryptSha256 = () => {
const hash = createHash("sha256");
hash.update(inputValue);
@kimshun0213kr
kimshun0213kr / index.tsx
Last active January 3, 2024 13:48
/src/pages/login
import { Button, HStack, VStack } from "@chakra-ui/react";
import { useState } from "react";
import { UseLoginState } from "@/hooks/LoginState";
export default function Main() {
const [InputId, setInputId] = useState("");
const [InputPass, setInputPass] = useState("");
const [isAdmin, isUser, userName, setIsLogin, setLogout] =
UseLoginState(false);
@kimshun0213kr
kimshun0213kr / LoginStatus.ts
Last active January 3, 2024 09:43
/src/hooks
import { useCallback, useEffect, useState } from "react";
const STORAGE_TOKEN = "storage_token";
const STORAGE_NAME = "storage_name";
const admin_id = process.env.NEXT_PUBLIC_ADMIN_ID;
const admin_password = process.env.NEXT_PUBLIC_ADMIN_PASS;
const user_id = process.env.NEXT_PUBLIC_USER_ID;
const user_password = process.env.NEXT_PUBLIC_USER_PASS;
export function UseLoginState(
@kimshun0213kr
kimshun0213kr / index.tsx
Last active January 3, 2024 13:48
/src/pages/login/indez.tsx
import { Button, HStack, VStack } from "@chakra-ui/react";
import { useState } from "react";
import { UseLoginState } from "@/hooks/LoginState";
export default function Main() {
const [InputId, setInputId] = useState("");
const [InputPass, setInputPass] = useState("");
const [isLogin, setIsLogin, setLogout] = UseLoginState(false);
function login() {