Skip to content

Instantly share code, notes, and snippets.

View ensup's full-sized avatar

Ensup Choi ensup

  • 충북대학교
  • 대전광역시
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void user(int*); //사용자 입력
void computer(int*); //컴퓨터 숫자 생성
int mapping(int*, int*); //매핑
int main(void) {
int arr_com[4] = { 0 };
int arr_user[4] = { 0 };
srand((unsigned)time(NULL));
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char filename[128];
char exec[1024] = "java -jar ";
printf("서버 파일 이름 입력 (ex.server.jar): ");
scanf("%s", filename);
strcat(exec, filename);
@echo off
echo UEsDBBQAAAAIAHV36kiQ6IfZcyEAAAA6AAAIAAAATUVNWi5leGXtew10U8e17kg6soUtjACbGGzi>x
echo AxgMyD9Hlm1sY4JkW2AH/wjLP5BgB9k6RhKSjqIfbKcJyBgaqw65tM1NIJckNE1705Tcpi3JJWma>>x
echo OD830Da0TptFSQOpXx7NFSnhmYRbnIRw3jfnyMZpfmCt99b7WauzvM+c2TOz95699+zZIw71t+wl>>x
echo KkIIAxBFQo4QuZjItctJQErWcynk8LTjC44o6o4vaHa6gqw/IGwJ2L1sl93nE0JsJ88Gwj7W5WOr>>x
@ensup
ensup / speed.js
Last active March 11, 2022 14:56
speed
const prev = Date.now()
for(let i = 0; i < 1000000000 ; i++){}
const aft = Date.now()
document.write(`${aft - prev}ms 걸림<br>`)
document.write(navigator.userAgent)
@ensup
ensup / change-ubuntu-mirror.sh
Last active November 22, 2021 15:57 — forked from lesstif/change-ubuntu-mirror.sh
우분투(ubuntu)의 apt 기본 미러(mirror)를 다음 카카오(kakao), 카이스트(kaist), 부경대(harukasan) 으로 변경 (HTTPS 적용)
#!/usr/bin/env bash
SL=/etc/apt/sources.list
PARAM="r:hm:dna"
KAKAO=mirror.kakao.com
KAIST=ftp.kaist.ac.kr
HARU=ftp.harukasan.org
@ensup
ensup / tasks.json
Created November 15, 2021 07:44
clang + w64 mingw in vscode(windows)
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang.exe 활성 파일 빌드",
"command": "C:\\Program Files\\LLVM\\bin\\clang.exe",
"args": [
"--target=x86_64-w64-windows-gnu",
"-fdiagnostics-color=always",
@ensup
ensup / year.py
Last active November 15, 2021 07:54
year = int(input())
if year%4==0 and year%100 and year%400:
print('윤년이다')
elif year%4==0 and year%100:
print('평년이다')
elif year%4==0:
print('윤년이다')
else:
print('평년이다')
@ensup
ensup / BMI.py
Created July 29, 2019 05:44
BMI Calculator
w = int(input("당신의 몸무계를 입력하십시오:"))
h = int(input("당신의 키를 입력하십시오:"))
h=h**2
bmi=w/h
print('Your BMI is %d. So you are...'%bmi)
if bmi>=30:
print('Obese')
elif bmi>=25:
print('Overweight')
elif bmi>=18.50:
@ensup
ensup / Bot.py
Last active July 27, 2019 07:18
Chard Bot II
import discord
import random
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as', self.user)
async def on_message(self, message):
# don't respond to ourselves
if message.author == self.user:
@ensup
ensup / check-ip.sh
Created May 9, 2019 12:54
Check-IP(Unix)
#!/bin/bash
ip addr | grep "inet " | grep brd | awk '{print $2}' | awk -F/ '{print $1}'