Skip to content

Instantly share code, notes, and snippets.

View HyunsDev's full-sized avatar
💪
조금씩 더 대단해지기!

박현우 HyunsDev

💪
조금씩 더 대단해지기!
View GitHub Profile
['div', 'span', 'ul', 'li', 'dd', 'dl', 'section', 'h1', 'a', 'img', 'form', 'button', 'header', 'footer', 'input', 'p'].forEach(e => {
document.querySelectorAll(e).forEach(element => {
element.style.outline = "1px solid dodgerblue"
})
})
import discord, asyncio, json, datetime, os, re
with open("./config/config.json", encoding="utf-8") as f:
config = json.load(f)
with open("./config/topic_list.json", encoding="utf-8") as f:
glo_topic_list = json.load(f)
with open("./config/topic.json", encoding="utf-8") as f:
# 아스키 누나
### 입력
디버그 = False
누나_코드 = ""
###
# "누나" 출력 코드
# 눈나..나..나..........주.거......나..........주.거......나..........거.......나..........거..!누나..나..나..........거.....나..........거..나..........나..........거........!
let is_line_open = false;
let line_scroll = () => {
// $(".debug").text($(this).scrollTop() + " " + is_line_open)
if ($(this).scrollTop() > 335) { //열기
if (is_line_open) {
// console.log("already open");
is_line_open = true;
} else {
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@500;800&display=swap');
* {
margin: 0;
padding: 0;
font-family: 'Noto Sans KR', sans-serif;
}
body {
background-color: #191F28;
router.post('/api/read', function (req, res, next) {
var connection = mysql.createConnection(dbconfig);
connection.connect();
connection.query("SELECT id, line, created FROM dayline2.lines ORDER BY id DESC limit 1000;", function (error, results, fields) {
if (error) {
console.log(error);
res.send({
status: "ERR",
reason: error
})
router.post('/api/write', function (req, res, next) {
let d_line = sanitizeHtml(req.body.line);
let d_date = moment().format('YY.MM.DD h시 mm분');
let d_author = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
if (d_line && d_date && d_author) {
if (d_line.len > 300) {res.send({status: "err", reason: "ERR_LINE_SO_LONG"});
} else if (d_line.len == 0) {res.send({status: "err", reason: "ERR_LINE_IS_EMPTY"});
} else {
var connection = mysql.createConnection(dbconfig.con);