Skip to content

Instantly share code, notes, and snippets.

View potados99's full-sized avatar
๐Ÿ˜†
ํžˆํžˆ

์†ก๋ณ‘์ค€ potados99

๐Ÿ˜†
ํžˆํžˆ
View GitHub Profile
@potados99
potados99 / script.js
Created November 6, 2025 04:23
Cursor ๋œฏ์–ด๊ณ ์น˜๊ธฐ
function adjustEditorContainerMaxHeight(editorContainer) {
const conditions = [
// ํ˜„์žฌ ์—๋””ํ„ฐ๊ฐ€ Cursor ์„ค์ • ํŒจ๋„์„ ํ‘œ์‹œํ•˜๊ณ  ์žˆ๋‹ค๋ฉด, max height๋ฅผ 7px ์ค„์ž…๋‹ˆ๋‹ค.
editorContainer.querySelector(".cursor-settings-pane-outer-wrapper") !== null,
// ํ˜„์žฌ ์—๋””ํ„ฐ๊ฐ€ Split View๋ฅผ ํ‘œ์‹œํ•˜๊ณ  ์žˆ๋‹ค๋ฉด(git diff view), max height๋ฅผ 7px ์ค„์ž…๋‹ˆ๋‹ค.
editorContainer.querySelector(".monaco-split-view2") !== null
];
if (conditions.some(condition => condition)) {
@potados99
potados99 / settings.json
Last active November 6, 2025 04:22
Cursor ๋œฏ์–ด๊ณ ์น˜๊ธฐ
{
"window.commandCenter": true,
"files.autoSave": "afterDelay",
"workbench.iconTheme": "vscode-jetbrains-icon-theme-2023-auto",
"editor.fontSize": 14,
"workbench.colorTheme": "WebStorm New Dark",
"git.openRepositoryInParentFolders": "always",
"typescript.tsserver.nodePath": "node",
"typescript.tsserver.maxTsServerMemory": 8192,
"explorer.confirmDelete": false,
@potados99
potados99 / status.sh
Created October 9, 2025 06:29
Raspberry Pi system status monitoring script
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
MAGENTA='\033[0;35m'
CYAN='\033[0;36m'
NC='\033[0m' # No Color
mkdir -p /Users/Shared/bin
echo '''#!/bin/sh\nhidutil property --set '\'{\"UserKeyMapping\":\[\{\"HIDKeyboardModifierMappingSrc\":0x7000000e6,\"HIDKeyboardModifierMappingDst\":0x70000006d\}\]\}\''''' > /Users/Shared/bin/right-option-to-f18-key-mapping
chmod 755 /Users/Shared/bin/right-option-to-f18-key-mapping
sudo cat<<: >/Users/Shared/bin/right-option-to-f18-key-mapping.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>Right Alt(Option) to F18</string>
@potados99
potados99 / pre-commit.sh
Created August 18, 2024 03:33
Pre commit hook
#!/bin/bash
[ "$(git symbolic-ref --short HEAD)" = "main" ] && echo "Pushing to main is not allowed." && exit 1
@potados99
potados99 / Scratch.java
Last active January 15, 2024 06:57
๋ถ•์–ด๋นตํ‹€
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Comparator;
import java.util.stream.Stream;
class XorPerformer {
@potados99
potados99 / Scratch.java
Last active January 1, 2024 13:27
ํ‘œ์ค€ใ…‹์•”ํ˜ธํ™”ใ…‹ใ…‹ใ…Ž
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Base64;
class Scratch {
public static void main(String[] args) throws IOException {
String pathPrefix = "C:\\Users\\Administrator\\AppData\\Roaming\\Google\\AndroidStudio2023.1\\scratches";
String filename = "20240101-123์‚ฌ4567-X-10-1234678.TXT";
@potados99
potados99 / main.cpp
Created December 14, 2023 09:49
Self registering factory pattern, modified
/*
Original source code from: https://www.nirfriedman.com/2018/04/29/unforgettable-factory/
*/
#include <iostream>
#include <string>
#include <vector>
template<class Base>
class Factory {
@potados99
potados99 / memberSeq.sh
Last active February 12, 2023 00:36
๊ณต๊ตฐ ๊ธฐ๋ณธ๊ตฐ์‚ฌํ›ˆ๋ จ๋‹จ ์ธํ„ฐ๋„ท ํŽธ์ง€ memberSeq ๊ตฌํ•ด์˜ค๋Š” ์Šคํฌ๋ฆฝํŠธ
curl 'http://airforce.mil.kr:8081/user/emailPicViewSameMembers.action?siteId=last2&searchName=์†ก๋ณ‘์ค€&searchBirth=19990211' -L -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' | grep "์„ ํƒํ•˜๊ธฐ" | sed -e 's/.*[^0-9]\([0-9]\+\)[^0-9]*$/\1/'
@potados99
potados99 / public_api.sql
Created December 27, 2022 05:51
Public API ํ…œํ”Œ๋ฆฟ
/**
POP ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์ง์ ‘ ํ˜ธ์ถœํ•˜๋Š” public ํ”„๋กœ์‹œ์ € ํ…œํ”Œ๋ฆฟ์ž…๋‹ˆ๋‹ค.
๋ชจ๋“  ์˜ˆ์™ธ๊ฐ€ ์—ฌ๊ธฐ์„œ ์žกํžˆ๋ฉฐ, ํŠธ๋žœ์žญ์…˜์„ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
ํ”„๋กœ์‹œ์ € ์ด๋ฆ„, ์•„๋ž˜ ์ฃผ์„๊ณผ v_tag, v_summary, v_detail์„ ์ˆ˜์ •ํ•œ ํ›„ ์‚ฌ์šฉํ•˜์—ฌ ์ฃผ์„ธ์š”.
*/
create
definer = MES_DHSol@`%` procedure sp_POP_GJ_BLAH_BLAH(
in $EQP_MASTER_CD varchar(32),
in $PRD_WO_CD varchar(32),
in $EMP_CD varchar(32)