레이블이 computer인 게시물을 표시합니다. 모든 게시물 표시
레이블이 computer인 게시물을 표시합니다. 모든 게시물 표시

[컴][파이썬] pyenv 를 windows에서 사용하면서 생긴 tip

 

pyenv 를 windows에서 사용하면서 생긴 tip

powershell 에서 virtual env 사용시 tip

profile 에 activate 함수

python -m venv .venv

powershell 에서는 activate.bat대신에 \.venv\Scripts\Activate.ps1 를 실행해야 한다.

powershell profile 에 아래처럼 함수를 만들어 놓으면 편하다.

function activate {
    $venv = ".\.venv\Scripts\Activate.ps1"
    if (Test-Path $venv) {
        & $venv
    } else {
        Write-Host "No .venv found in current directory"
    }
}

pip-autoremove

우연히 package 삭제를 알아보다가. pip-autoremove 가 괜찮다고 해서 python3 에서 설치하는데 실행시점에 module 이 없다고 나옴. 알고보니 pip3-autoremove 가 따로 있었음.

pip install pip-autoremove 는 이제 pip install pip3-autoremove 로 변경 됨

[컴] fnm 사용해서 nodejs 설치

 

fnm , winget설치, 노드 설치

fnm 사용해서 nodejs 설치

필자는 기본 폴더가 아닌 d:\ 에 설치하려고 한다.

그래서 fnm 도 release 에 download 해서 설치했다.

  1. fnm설치
  2. 시스템 환경 변수 편집 화면에서 ’환경변수’에 d:\a\apps\node_fnm\ 추가
  3. 윈도우 환경 변수에 FNM_DIR이라는 항목을 추가
    • FNM_DIR : d:\a\apps\node_fnm\nodejs
  4. fnm install --lts
    • d:\a\apps\node_fnm\nodejs\node-versions\v24.14.1\ 에 설치된다.
  5. notepad $PROFILE
    • c:\Users\<User_name>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
    • 다음을 넣고, 저장 fnm env --use-on-cd | Out-String | Invoke-Expression
    • & $PROFILE 로 profile 적용
    • node -v 를 해서 잘 동작하는지 확
  6. fnm use lts-latest

[컴] 원격으로 pc 전원 켜기

 

원격 켜기 / pc 켜기 /

원격으로 pc 전원 켜기

개인적으로 WoWLAN 을 하고 싶었지만, 무선랜카드가 지원하지 않아서 다른 방법들을 찾아보았다.

1. 중간에 공유기를 하나 더 두고, pc에 유선을 연결해서 Wake On LAN 사용

wireless endpoint 에 공유기를 하나 더 두고, 거기서 유선을 이용해 pc에 연결하면 Wake On LAN을 사용할 수 있다.

2. 스마트플러그 이용

개인적으로 이 방법이 가장 저렴하고 알맞는 방법처럼 보인다.

3. Tuya Bluetooth 스위치

4. 원격스위치, 데스크탑 컴퓨터용

이 상품은 유효거리가 10m 로 짧아서 밖에서 켜는 등의 원거리 전원 켜기에 적합하지 않다.

[컴] NVidia Multi-Instance GPU (MIG)

 

엔비디아

NVidia Multi-Instance GPU (MIG)

MIG 개념

Multi-Instance GPU (MIG) | NVIDIA

  • GPU를 최대 7개의 인스턴스로 분할할 수 있으며,
  • 각 인스턴스는 고대역폭 메모리, 캐시 및 컴퓨팅 코어를 갖춘 완벽한 격리 환경을 제공
  • 이를 통해 관리자는 가장 작은 워크로드부터 가장 큰 워크로드까지 모든 워크로드를 지원하고,
  • 서비스 품질(QoS)을 보장하며,
    • MIG(메모리 통합)를 사용하지 않으면 동일한 GPU에서 실행되는 여러 작업(예: 서로 다른 AI 추론 요청)이 동일한 리소스를 놓고 경쟁.
    • 메모리 대역폭을 많이 사용하는 작업이 다른 작업에 자원을 부족하게 만들어 여러 작업이 목표 지연 시간을 달성하지 못하게 된다.
    • MIG를 사용하면 작업이 서로 다른 인스턴스에서 동시에 실행되며, 각 인스턴스는 컴퓨팅, 메모리 및 메모리 대역폭에 대한 전용 리소스를 갖게 되어 QoS(서비스 품질)를 보장하고 GPU 활용률을 극대화하여 예측 가능한 성능을 제공한다.
  • GPU는 크기가 다른 MIG 인스턴스로 분할할 수 있다.
    • 예를 들어 NVIDIA GB200 의 경우 관리자는 각각 95GB 메모리를 가진 인스턴스 2개, 각각 45GB 메모리를 가진 인스턴스 4개 또는 각각 23GB 메모리를 가진 인스턴스 7개를 생성할 수 있다.
  • MIG 인스턴스는 동적으로 재구성할 수 있으므로 관리자는 변화하는 사용자 및 비즈니스 요구에 맞춰 GPU 리소스를 조정할 수 있다.
    • 예를 들어, 낮에는 7개의 MIG 인스턴스를 낮은 처리량의 추론에 사용하고 밤에는 딥러닝 학습을 위해 하나의 대규모 MIG 인스턴스로 재구성할 수 있다.
    • 이전 암페어(Ampere) 아키텍처에선 GPU 를 reset 해야 MIG mode 를 켤 수 있었지만, Hopper 부터는 reset 이 필요없다.
    • MIG Manager supports dynamic reconfiguration of the MIG geometry.

MIG profile 구성

로봇칩에선 어떻게 쓰이나?

Multi-Instance GPU | 피지컬 AI를 위한 궁극의 플랫폼 NVIDIA Jetson Thor을 소개합니다. - NVIDIA Technical Blog

  • 이를 통해 중요한 워크로드에는 리소스를 고정할 수 있고, 우선순위가 낮은 작업은 병렬로 실행할 수 있어, 다양한 중요도가 혼합된 로보틱스 애플리케이션에 적합

PVA, Programmable Vision Accelerator

PVA backend, VPI - Vision Programming Interface: Architecture

  • PVA 는 프로세서, 이미지 처리 및 컴퓨터 비전 알고리즘에 특화되어 있습니다.
  • GPU만 수행할 수 있는 다른 작업을 실행하기 위해 GPU를 자유롭게 해야 할 경우 PVA 백엔드를 사용해라.
    • 딥러닝 추론 단계나 CUDA 백엔드에서만 구현되는 알고리즘처럼
  • PVA 하드웨어는 CPU 및 CUDA 하드웨어보다 전력 효율이 훨씬 높다. 따라서 전력 소모가 중요한 경우 가능한 한 PVA 백엔드를 사용해라.

Optimizing the CV Pipeline in Automotive Vehicle Development Using the PVA Engine | NVIDIA Technical Blog

  • PVA(Programmable Vision Accelerator) 의 구조
  • 자율주행 차량을 개발하는 많은 개발자들은 SoC의 연산 자원이 부족해 CPU, GPU, VIC, DLA에 과부하가 걸리는 문제에 직면하고 있다. 이것이 시스템 안정성과 지연 시간에 부정적인 영향을 미칠 수 있다.
  • 이러한 문제를 해결하기 위한 방안으로, 과도하게 사용 중인 SoC 하드웨어 엔진의 부하를 줄이기 위해 PVA 하드웨어를 이용해서 연산을 분산시키는(오프로딩) 방법이 검토되고 있다.
  • PVA로 오프로딩할 수 있는 처리 작업의 예
    • 이미지 처리: 일부 이미지 처리 및 컴퓨터 비전(CV) 작업은 PVA로 포팅하여 GPU, CPU, VIC, 심지어 DLA의 부하까지 줄일 수 있습니다.
    • 딥러닝 연산: 딥러닝 네트워크 내에서 특정 레이어나 연산 집약적인 오퍼레이터(예: ROI Align)는 PVA로 오프로딩할 수 있습니다. 특정 조건에서는 소규모 딥러닝 네트워크 전체를 PVA로 포팅하는 것도 가능합니다.
    • 수학 연산: PVA는 벡터 SIMD VLIW DSP 구조를 갖추고 있어 행렬 연산, FFT 등과 같은 수학 연산을 효율적으로 처리할 수 있습니다.

[컴] Cloudflare 로 도메인 registar 변경

도메인 이전 / 클라우드플레어 / 닷컴 도메인 저렴하게 / registar 변경 방법 / 클라우드플레어 사용법 / 이전법

Cloudflare 로 도메인 registar 변경

  • 이전하려는 곳에서 ’도메인전송 인증코드’를 이미 받은 상황이다.
  • .com 주소를 이관하려는 상황

제한사항

Transfer your domain to Cloudflare | Cloudflare Registrar docs

  • Cloudflare Registrar 를 쓰는 모든 도메인은 Cloudflare DNS 를 써야 한다.
  • Cloudflare registrar 를 쓰는 동안은 다른 dns 를 쓸 수 없다.

See Also

  1. 도메인 주소(.com) 다른 업체로 이전하는 방법

Reference

  1. Transfer your domain to Cloudflare | Cloudflare Registrar docs

jay.ns.cloudflare.com joselyn.ns.cloudflare.com

[컴][머신러닝] AI coding agent 를 써보고 남기는 후기

 

코딩 에이전트 / coding agent / coding AI

https://news.ycombinator.com/item?id=46255285

AI coding agent 를 써보고 남기는 후기

  • google 의 Antigravity :  
    • https://antigravity.google/download 
    • 지금은 무료다. 앞으로도 무료일지는 모르겠다.
    • 좋다. 기존의 다른 agent 보다 낫다. 이유는 IDE 를 agent 중심의 IDE로 개편했기 때문이라고 볼 수 있다. 
    • ctrl + e 를 누르면 agent 모드가 나오는데, 여기서 agent 와 대화하면, agent 가 구현해서 보여주고, 어떻게 할까요? 물어보는 등 좀 더 자연스러운 UI 를 제공한다. 
  • GitHub Copilot 무료버전 :
    • VS Code에서 GitHub Copilot을 무료로 제공합니다 | Microsoft Community Hub
    • 매달 2000개의 코드 자동 완성을 사용
    • 월 50회의 채팅 요청
    • vscode나 github page에서 현재 사용량을 파악할 수 있다.
    • 나쁘진 않으나, context 설정을 하는 것이 조금은 귀찮은 면이 있다.
    • 가격이 착한편이라고 생각한다. 가장 저렴한 것은 무료이고, 그 다음은 한달에 10달러
  • AmazonQ : 좋다, ai coding agent 가 좋다. 월에 limit 이 있다.
  • cline : openroute 를 통해서 무료 llm을 사용하면 좋다. 그렇지 않은 경우 오히려 code 전문 ai agent 를 사용하는 것이 더 저렴할 수 있다.
    • https://www.reddit.com/r/openrouter/comments/1jeknm9/when_do_free_daily_limits_reset/?tl=ko : UTC 00:00 에 credit 이 refresh 된다.
  • qodo(과거 codeium) : 여기도 한달 limit 이 있다. / 그렇게 좋지 않다. 마치 github copilot 과 비슷한데, 편의성이 좀 떨어지는 느낌이다.
  • Cursor :
    • vscode가 아닌 vscode를 fork 한 자체 IDE를 써야 한다.
    • 그래서 ms 의 extension 등을 사용할 수 없거나, 최신 extension 의 사용이 안된다고 한다.
    • 개인적으로 그래서 별로 안쓰게 됨
  • claude code :
  • AMP
    • Cody 시절에 써봤는데 좋다고 생각한다. 다만, 지금은 가격정책이 명확치 않아서 가성비가 좋은지는 모르겠다.
    • Sourcegraph | Pricing

무료 AI chat agent 들

[컴][유틸] Windows 11 에서 nvim 사용시

neovim / 윈도우에서 vim/ neovim / simple ide /

Windows 11 에서 nvim 사용시

Windows 에서 설치

nvim에서 :terminal 등을 실행할때 cmd 가 아니라 powershell 을 사용하도록 하는 법

init.lua의 path

운영체제 설정 파일 경로
Linux/macOS ~/.config/nvim/init.lua 또는 ~/.config/nvim/init.vim
Windows %userprofile%\AppData\Local\nvim\init.lua 또는 init.vim

init.lua

-- PowerShell을 기본 쉘로 사용하도록 설정
vim.opt.shell = "powershell"
vim.opt.shellcmdflag =
  "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;"
vim.opt.shellredir =
  "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode"
vim.opt.shellpipe =
  "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode"

새로운 theme 를 추가하는 법

  • %UserProfile%\AppData\Local\nvim\lua\plugins\colorscheme.lua 을 추가

return {
  -- 1. 테마 플러그인 추가
  {
    "craftzdog/solarized-osaka.nvim",
    name = "solarized-osaka",
    lazy = false,
    priority = 1000,
    opts = {},
  },
  {
    "Mofiqul/vscode.nvim",
    name = "vscode",
    lazy = false,
    priority = 1000,
    opts = {},
  },
  {
    "gmr458/vscode_modern_theme.nvim",
    lazy = false,
    priority = 1000,
    config = function()
        require("vscode_modern").setup({
            cursorline = true,
            transparent_background = false,
            nvim_tree_darker = true,
        })
        vim.cmd.colorscheme("vscode_modern")
    end,
  },

  -- 2. LazyVim의 기본 테마를 새로 추가한 테마로 설정
  {
    "LazyVim/LazyVim",
    opts = {
      colorscheme = "vscode_modern",
    },
  },
}

양끝에 괄호 넣기 등 surround 기능 켜기

설치방법 :

  • LazyExtras 명령을 실행한다.
  • 목록에서mini.surround 항목을 찾아 커서를 두고 x 키를 눌러 활성화한다.
  • nvim을 재시작하면 lazy.nvim이 자동으로 플러그인을 설치하고 설정을 적용

사용법:

  • Visual mode (v)에서 구간 선택
  • gsa -> 괄호등의 둘러쌓을 키

단축키

  • <space> + f + p : project 변경
  • <ctrl> + h or j or k or l : 커서를 다른 창으로 움직일때 사용
  • <Shift> + h or l : tab 이동
  • :new : 새 tab 열기
  • ciw : Change Inner Word
  • caw : Change A Word

See Also

  1. Say Goodbye to Your IDE: Meet LazyVim

[컴][php] DuckDB + Codeception 기반 BDD 테스트 환경 설정 방법

duckdb 와 codeception / php behavior test / BDD in php

DuckDB + Codeception 기반 BDD 테스트 환경 설정 방법

1. .env.testing 설정

.env.testing 파일을 아래와 같이 설정합니다:

APP_ENV=testing
DB_CONNECTION=duckdb
DB_DATABASE=dusk_test.duckdb
CHROMEDRIVER_PORT=9515
TEST_SERVER_PORT=8001
DUSK_SERVER_PORT=8081
SESSION_DRIVER=file
CACHE_DRIVER=file

2. DuckDB 테스트 환경 구성

tests/TestCase.php에서 DuckDB 테스트 환경을 구성합니다:

<?php

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
    protected function setUp(): void
    {
        parent::setUp();

        // DuckDB 테스트 데이터베이스 파일 생성
        $testDbPath = base_path(env('DB_DATABASE', 'dusk_test.duckdb'));
        if (!file_exists($testDbPath)) {
            touch($testDbPath);
        }

        // DB 연결 설정
        config(['database.connections.duckdb.database' => $testDbPath]);
        config(['database.default' => 'duckdb']);

        // DuckDB 서비스 프로바이더 등록
        $this->app->register(\App\Providers\TestDuckDBServiceProvider::class);

        // 마이그레이션 실행
        if (method_exists($this, 'artisan')) {
            $this->artisan('migrate:fresh', [
                '--database' => 'duckdb',
                '--path' => 'database/duckdb_migrations'
            ]);
        }
    }
}
<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Database\DatabaseManager;

class TestDuckDBServiceProvider extends ServiceProvider
{
    public function register()
    {
        // 테스트 환경에서만 DuckDB 드라이버 등록
        if ($this->app->environment('testing')) {
            $this->app->resolving('db', function (DatabaseManager $db) {
                $db->extend('duckdb', function ($config, $name) {
                    // DuckDBService를 통해 DuckDB 인스턴스 생성
                    $duckdb = app(\App\Services\DuckDBService::class)->createConnection($config);
                    // 커스텀 DuckDB 연결 클래스로 래핑
                    return new \App\Database\Connections\DuckDBConnection($duckdb, $config['database'] ?? '', '', $config);
                });
            });
        }
    }
}
<?php

namespace App\Database\Connections;

use Illuminate\Database\Connection;
use Saturio\DuckDB\DuckDB as BaseDuckDB;
use Illuminate\Database\Query\Processors\Processor;

class DuckDBConnection extends Connection
{
    protected $duckdb;

    public function __construct(BaseDuckDB $duckdb, $database = '', $tablePrefix = '', array $config = [])
    {
        $this->duckdb = $duckdb;
        parent::__construct($duckdb, $database, $tablePrefix, $config);
    }

    protected function getDefaultQueryGrammar()
    {
        return $this->getQueryGrammar();
    }

    protected function getDefaultSchemaGrammar()
    {
        return $this->getSchemaGrammar();
    }

    protected function getDefaultPostProcessor()
    {
        return new Processor();
    }

    public function getDuckDB()
    {
        return $this->duckdb;
    }

    public function select($query, $bindings = [], $useReadPdo = true)
    {
        return $this->executeQuery($query, $bindings);
    }

    public function insert($query, $bindings = [])
    {
        return $this->executeQuery($query, $bindings);
    }

    public function update($query, $bindings = [])
    {
        return $this->executeQuery($query, $bindings);
    }

    public function delete($query, $bindings = [])
    {
        return $this->executeQuery($query, $bindings);
    }

    public function getName()
    {
        return $this->getConfig('name') ?: 'duckdb';
    }

    public function executeQuery($sql, $params = [])
    {

        if (empty($params)) {
            return $this->duckdb->query($sql);
        }

        $prepared = $this->duckdb->preparedStatement($sql);
        foreach ($params as $index => $param) {
            $prepared->bindParam($index + 1, $param);
        }
        return $prepared->execute();
    }
}

3. Codeception 설정

codeception.yml 설정

paths:
  tests: tests
  output: tests/_output
  data: tests/Support/Data
  support: tests/Support
  envs: tests/_envs
actor_suffix: Tester
extensions:
  enabled:
    - Codeception\Extension\RunFailed

tests/acceptance.suite.yml 설정

actor: AcceptanceTester
modules:
    enabled:
        - WebDriver:
            url: "http://localhost:8080/"   # EnvWebDriver에서 재정의된다.
            browser: 'chrome'
            host: '127.0.0.1'
            port: "9515"                    # EnvWebDriver에서 재정의된다.
            path: ''
            capabilities:
                chromeOptions:
                    args: ["--no-sandbox", "--disable-dev-shm-usage"]
        - Support\Helper\EnvWebDriver
step_decorators:
    - Codeception\Step\ConditionalAssertion
    - Codeception\Step\TryTo
    - Codeception\Step\Retry

4. WebDriver 환경변수 동적 주입

tests/Support/Helper/EnvWebDriver.php에서 acceptance.suite.yml에 환경변수를 동적으로 주입합니다:

class EnvWebDriver extends Module
{
    public function _beforeSuite($settings = [])
    {
        file_put_contents(codecept_output_dir() . 'envwebdriver.log', print_r($_ENV, true));
    }

    public function _initialize()
    {
        $testServerPort = getenv('TEST_SERVER_PORT') ?: '8080';
        $port = getenv('CHROMEDRIVER_PORT') ?: '9515';
        $url = 'http://localhost' . ':' . $testServerPort . '/';

        if ($this->hasModule('WebDriver')) {
            $wd = $this->getModule('WebDriver');
            $wd->_setConfig(['url' => $url, 'port' => $port]);
        }
    }
}

5. 테스트 코드 예시

Acceptance 테스트 - tests/Acceptance/FinancialTradesCest.php

public function tradesTablePaginationWorks(AcceptanceTester $I)
{
    $I->amOnPage('/duckdb/financial-trades');
    $I->waitForElementVisible('#tab-trades', 5);
    $I->click('#tab-trades');
    $I->waitForElementVisible('#trades-container', 5);

    $tradeIdIndex = 0;
    $firstTradeId = $I->executeJS("
        const idx = $tradeIdIndex;
        const firstRow = document.querySelector('#trades-container tbody tr:first-child');
        if (!firstRow || idx < 0) return null;
        const cells = firstRow.querySelectorAll('td');
        return cells[idx]?.textContent.trim() ?? null;
    ");
    \PHPUnit\Framework\Assert::assertNotEmpty($firstTradeId);

    $paginationSelector = "//a[contains(@href, 'page=2') and normalize-space(text()) ='2']";
    $I->waitForElementClickable(By::xpath($paginationSelector), 5);
    $I->click(By::xpath($paginationSelector));
    $I->waitForText('Loading...', 5, '#content-trades');
    $I->waitForElementNotVisible(By::xpath("//div[@id='content-trades' and contains(text(), 'Loading...')]"), 20);
    $I->wait(10);

    $secondTradeId = $I->executeJS("
        const idx = $tradeIdIndex;
        const firstRow = document.querySelector('#trades-container tbody tr:first-child');
        if (!firstRow || idx < 0) return null;
        const cells = firstRow.querySelectorAll('td');
        return cells[idx]?.textContent.trim() ?? null;
    ");
    assertNotEquals($firstTradeId, $secondTradeId);
}

6. 실행

.\run-acceptance-test.ps1

Main 을 확인하자

# ChromeDriver 자동 설치 및 테스트 실행 스크립트 (Windows PowerShell)

[Console]::OutputEncoding = [System.Text.Encoding]::UTF8

# 변수 선언
$envFilePath = ".env.testing"
$chromedriverPath = ".\chromedriver-win64\chromedriver.exe"
$zipUrl = "https://storage.googleapis.com/chrome-for-testing-public/140.0.7339.80/win64/chromedriver-win64.zip"
$zipFile = "chromedriver-win64.zip"
$extractPath = "."

function Print-Info($msg) {
    Write-Host "[INFO] $msg"
}
function Print-Warn($msg) {
    Write-Warning "[WARN] $msg"
}

function Load-EnvVariables($EnvFilePath) {
    if (Test-Path $EnvFilePath) {
        Get-Content $EnvFilePath | ForEach-Object {
            $line = $_.Trim()
            if ($line -and !$line.StartsWith('#') -and $line.Contains('=')) {
                $key, $value = $line.Split('=', 2)
                $key = $key.Trim()
                $value = $value.Trim().Trim('"').Trim("'")
                Set-Item -Path "Env:\$key" -Value $value
            }
        }
        Print-Info "환경 변수가 로드되었습니다.($EnvFilePath)"
    } else {
        Print-Warn "Could not find .env file at '$EnvFilePath'."
    }
}

function Install-ChromeDriver() {
    if (-Not (Test-Path $chromedriverPath)) {
        Print-Info "ChromeDriver가 없습니다. 다운로드 및 설치를 시작합니다..."
        Invoke-WebRequest -Uri $zipUrl -OutFile $zipFile
        Print-Info "압축 해제 중..."
        Expand-Archive -Path $zipFile -DestinationPath $extractPath
        Print-Info "압축 파일 삭제 중..."
        Remove-Item $zipFile
        Print-Info "설치 완료!"
    } else {
        Print-Info "ChromeDriver가 이미 설치되어 있습니다."
    }
}

function Start-ChromeDriver($chromedriverPort) {
    if (Get-Process -Name "chromedriver" -ErrorAction SilentlyContinue) {
        Print-Info "ChromeDriver가 이미 실행 중입니다."
    } else {
        Print-Info "ChromeDriver가 실행 중이 아닙니다. 테스트를 시작합니다."
        Start-Process -NoNewWindow -FilePath $chromedriverPath -ArgumentList "--port=$chromedriverPort"
        Start-Sleep -Seconds 10
    }
}

function Seed-Database() {
    Print-Info "테스트용 DB 시드 데이터 입력 중..."
    $env:APP_ENV="testing"; php artisan seed:financial-trades
}

function Start-TestServer($testServerPort) {
    Print-Info "테스트용 웹서버를 실행합니다 (php artisan serve --env=testing --port=$testServerPort)..."
    Start-Process -NoNewWindow -FilePath "php" -ArgumentList "artisan serve --env=testing --port=$testServerPort"
    Start-Sleep -Seconds 5
}

function Run-AcceptanceTest() {
    Print-Info "Codeception acceptance 테스트 실행 중..."
    vendor\bin\codecept run acceptance
}

function Main() {
    Load-EnvVariables $envFilePath
    $chromedriverPort = $env:CHROMEDRIVER_PORT
    $testServerPort = $env:TEST_SERVER_PORT

    Install-ChromeDriver
    Start-ChromeDriver $chromedriverPort
    Seed-Database
    Start-TestServer $testServerPort
    Run-AcceptanceTest
}

Main

Main 의 주요 단계 설명

  1. 환경변수 로드 : .env.testing 파일을 읽어 PowerShell 환경변수로 설정합니다.
    • Load-EnvVariables $envFilePath
  2. 포트 변수 추출 : 환경변수에서 ChromeDriver와 테스트 서버 포트를 가져옵니다.
    • $chromedriverPort = $env:CHROMEDRIVER_PORT
    • $testServerPort = $env:TEST_SERVER_PORT
  3. ChromeDriver 설치 : 없으면 자동 다운로드 및 압축 해제.
    • Install-ChromeDriver
  4. ChromeDriver 실행 : 지정 포트로 프로세스 실행.
    • Start-ChromeDriver $chromedriverPort
  5. DB 시드 데이터 입력 : artisan 커맨드로 DuckDB에 거래 데이터 입력.
    • Seed-Database
  6. 테스트용 웹서버 실행 : php artisan serve로 테스트 서버 기동.
    • Start-TestServer $testServerPort
  7. Codeception acceptance 테스트 실행
    • Run-AcceptanceTest

결과 확인

테스트 결과는 tests/_output/ 폴더에서 확인할 수 있습니다.

[컴] 무료 AI chat agent

 

무료 ai 채팅 / 코딩 툴 / AI coding assitant / gpt / 챗gpt / 지피티 / 코딩시 사용할 수 있는 무료 ai / 코딩시 유용한 / 코딩에 적합한

무료 AI chat agent

다음 내용은 ref.1 의 내용중 일부를 정리한 내용, ref. 1 은 Tom 이란 개발자가 정리한 내용임

  • GLM 4.5
    • 웹에서 무료
    • 체감상 Claude 4 수준 또는 그 이상으로 성능이 좋다고 함
  • Kimi K2
    • 웹에서 무료 
    • Claude 또는 Opus 계열과 유사한 모델.
    • GLM 4.5 등장 전에는 하루에도 여러 번 까다로운 버그를 해결해줌
  • Qwen3 Coder 및 신형 모델들: 다양한 코딩 특화 모델 테스트용으로 사용
  • OpenAI Playground
    • 무료 토큰 제공 :  계정 데이터 설정에서 "OpenAI가 데이터를 모델 학습에 사용"하도록 허용하면 무료 토큰이 지급됨
    • GPT-4.5, o3 등 다양한 모델을 무료로 활용 가능.
  • Google Gemini AI Studio
    • Gemini 2.5 Pro/Flash 모델을 무료·무제한에 가깝게 사용 가능.
  • Google Gemini 2.5 Pro
    • AI Studio와는 별개 서비스
    • 이미지 생성과 심층 연구 기능이 더 뛰어남.
  • Poe.com: Claude 4나 o4-mini 등 프리미엄 모델에 대해 일일 무료 크레딧 제공
  • OpenRouter
    • 무료 및 유료 모델 혼합 사용 가능. 
    • me: free 라고 붙어있는 모델을 사용하면 web 에서 무제한으로 사용가능 
  • ChatGPT: 무료 버전도 여전히 유용해 최소 1개 탭 유지
  • Perplexity AI: 리서치 중심 질문에 강점
  • Deepseek
    • v3와 r1 모델 무료 제공.
    • 단, 컨텍스트 제한 주의
  • Grok.com
    • 일반적 사용과 심층 연구, 이미지 편집에 무제한 무료 제공. 
    • 특히 심층 연구 기능이 Perplexity와 유사해 유용 
    • 주의사항 : Grok은 무료 연산과 검열되지 않은 이미지 생성을 제공하여 다른 모델의 안전 시스템이 방해될 때 유용할 수 있음. 그러나 운영자가 나치 연관 사상이나 허위정보를 홍보하려는 의도를 가질 가능성이 있다는 보고가 있음. 특히 아프리카 집단 학살 등 역사적 사건에 대해 거짓 정보를 제공하도록 지시받았다는 주장도 있음. 이러한 왜곡은 주로 X 플랫폼에서 나타나지만, 코딩 같은 안전한 용도에만 제한적으로 활용하거나, 잠재적 편향을 염두에 두고 사용하는 것이 권장됨.
  • Phind: 답변 시 플로우차트나 다이어그램을 함께 제공하려는 시도를 함
  • lmarena.ai: Claude Opus 4와 Sonnet 4를 무료로 제공. Opus 4 무료 사용은 상당히 가치가 높음
  • Claude.ai 자체도 무료지만, 사용 제한이 잦아 불편할 수 있어 Cody 확장이나 Copilot 등을 통해 다른 접근 방식을 사용함.

Reference

  1. AI를 무료 또는 저렴하게 활용하여 개발하는 방법 | GeekNews
  2. My AI Code Prep & Cline Workflow for Budget Coding/Debugging (Part 1)

[컴] 글자선택이 좋고, 빠르게 실행되는 ebook reader

 

ebook reader

글자선택이 좋고, 빠르게 실행되는 ebook reader

  • calibre ebook viewer : 여러페이지에 대한 text 의 선택은 좋지만 최초 실행시간이 오래걸린다.
  • SumatraPDF : 가장 열리는 속도가 빠르다. 여러페이지 선택은 별로 좋지 않다. 드래그로만 해야 한다. 
    • 팁1: 화면을 최대한 줄여서 여러페이지를 드래그하기 수월할 수 있다. 
    • 팁2: 드래그 상태에서 키보드로 페이지를 넘기는 방법도 괜찮다.
  • freda : 여러페이지에 대한 text 의 선택이 어렵다.
  • FBReader : 최초실행시간은 좋지만 여러페이지에 대한 text 선택이 어렵다.
  • Thorium Reader : 레이아웃을 스크롤로 변경하면 여러페이지에 대한 선택은 되는데, epub 파일을 직접 ebook reader 에서 호출할 수는 없는듯.

[컴] 무료 인도 vpn

 

india / 인도 vpn / 무료 인도 vpn

무료 인도 vpn

vpn 에서 제공하는 무료 국가들

hide.me:

  • 무료제공 : 네델란드, 스위스, 미국

Proton VPN

  • 무료제공(선택불가) : 미국, 네델란드, 일본

TunnelBear

  • 전송량 제한

Windscribe

  • 전송량 제한
  • 무료제공 : 미국, 캐나, 프랑스, 독일, 네델란드, 노르웨이, 루마니아, 스위스, 영국, 홍콩

[컴] server5.click 무료 서버 사용, php

무료 php server / 무료 호스팅 / mysql 사용

server5.click 무료 서버 사용, php

  1. cloudflare 에서 domain 구입
  2. server5.click 의 가입 : https://panel.server5.click/
  3. server5.click 에서 domain 입력하고 free server 를 구매
  4. server5.click 에서 메일로 server 정보가 날라옴, control panel url 도 같이 온다.
  5. cloudflare 에 가서 DNS record 입력 : domain 과 ip address 를 연결
  6. web browser에서 domain 입력하면 아래처럼 화면이 보인다.
  7. web browser에서 ‘Control panel’ 에서 로그인, id/pw 는 메일을 확인하자.
    1. password 변경
    2. ‘CWP Settings -> Php Selector’ 에서 ‘php 8.3(Selector FPM)’ 으로 변경
    3. ‘Addons -> Scripts -> Laavel -> Install’ : db name 과 pw 를 정해야 한다.
    4. Collation 을 ’utf8mb4_general_ci’로 변경 : Databases -> phpMyAdmin -> database 선택 -> Operations tab -> Collation 을 ’utf8mb4_general_ci’로 변경

[컴] duckdb 사용

 

duckdb 사용

duckdb 에 대한 cli client 를 설치해서 사용해보자.

그냥 duckdb를 실행하면, memory 에 db 륾 만들고, 뒤에 file path 를 넣으면 file 로 만들어 준다. 들어가서 .databases 정도만 실행하면 만들어준다. 아무작업도 안하면 그냥 아무것도 만들지 않는다.

duckdb

duckdb mydb.duckdb
D .databses

확장프로그램 extension

INSTALL, LOAD 를 통해 확장프로그램을 load하게 된다.

INSTALL extension_name;
LOAD extension_name;

gui client

자체 gui client

browser에서 동작한다. ui는 notebook 과 비슷하다.

INSTALL ui;
LOAD ui;
CALL start_ui();

DBeaver

DBeaver에서도 duckdb 를 작업할 수 있다. 개인적으로 DBeaver로 작업이 편하다.

[컴] chrome 에서 ctrl+tab 을 ’최신탭으로 이동’으로 변경

크롬에서 창바꾸기 / firefox 처럼 switch windows / switch tabs

chrome 에서 ctrl+tab 을 ’최신탭으로 이동’으로 변경

QuicKey 라는 extension 이 이 기능을 제공한다.

아래 링크로 가면, 크롬의 ‘키보드 단축키’(Keyboard shortcuts)에서 Ctrl+Tab에 대한 설정을 어떻게 하는 지 알려준다. 글을 보면 javascript 를 이용해서 한다.

chrome.developerPrivate.updateExtensionCommand({
    extensionId: "ldlghkoiihaelfnggonhjnfiabmaficg",
    commandName: "010-open-popup-window",
    keybinding: "Ctrl+Tab"
});

참고로 이전의 ctrl + tab 으로 tab 을 이동하는 것은 ctrl + page up, ctrl + page down 을 이용하면 된다.

[컴] Windows11 에서 Dev Drive 설정

window 11 데브 드라이브 / 개발자 드라이브 / windows 11 /

Windows11 에서 Dev Drive 설정

prerequisites

  • Windows 11, 빌드 #10.0.22621.2338 이상
  • 16GB 메모리 권장(최소 8GB)
  • 최소 50GB의 여유 디스크 공간

disk 필요

기존의 할당되어 있지 않은(unallocated) disk 를 사용하거나, 새롭게 unallocated disk 를 생성해야 한다.

disk 를 생성하는데는 2가지 방법이 있다.

  1. VHD 를 만들기
  2. 기존 volume의 size를 줄여서 새로운 disk 를 생성

여기서는 VHD 만들기를 사용한다. 가상 disk 를 생성하는 방법이다.

절차

  1. diskmgmt.msc : 디스크관리 메뉴로 들어간다.
  2. ‘동작 -> VHD 만들기’
  3. ‘위치’, ‘크기’, ‘VHDX 선택’, ’동적 확장’을 선택 ( screenshots 참고)
    • 크기는 최소 50GB 이상으로 하자.
  4. disk 초기화 : 파티션 형식은 GPT ( screenshots 참고)
  5. volume 생성 : ( screenshots 참고)
    • 포맷은 하지 않는다.
    • 볼륨생성하면 drive 문자를 할당하게 된다. 여기서는 e: 에 할당한다.
  6. cmd 창에서 Format e: /DevDrv /Q

screenshots

가상하드디스크 생성
disk 초기화-1
disk 초기화-2
volume생성-1
volume생성-2

dev drive 이용

dev drive 에는

  • 소스 코드 저장소(repository) 및 프로젝트 파일
  • 패키지 캐시
  • 빌드 결과물과 중간 파일, 즉, 빌드를 여기서 하면 된다.

dev drive는 어떻게 동작하는가?

How does Dev Drive work?

  • dev drive 는 ReFS(Resilient File System)를 이용한다.
  • ReFS 는 다음과 같은 이점이 있다.
    • data availability(데이터 가용성)을 극대화
    • 다양한 부하들(workloads)에서 나오는 대용량 데이터셋에 대해서 효율적으로 확장이 가능
    • 손상에 대한 복원력을 통해 데이터 무결성을 제공
  • ReFS 를 통해서 dev drive 는
    • 개발 작업의 부하들(development workloads)을 위한 storage volume 을 초기화하게 된다.
    • 더 빠른 성능 제공
    • 개발 시나리오들에 최적화된 customizable setting 을 제공
    • ReFS 는 key 개발자 시나리오들의 성능을 향상시키기 위한 파일 시스템별 여러 최적화들이 포함되어 있다.

package cache 설정 방법

재부팅시 자동으로 mount

powershell 에서 mount/unmount

  • Dismount-DiskImage -ImagePath "d:\a\vmbox\devDrive\dev_drive.vhdx"
  • Mount-DiskImage -ImagePath "d:\a\vmbox\devDrive\dev_drive.vhdx"

See Also

  1. Configure Dev Drive policy for enterprise business devices | Microsoft Learn

Reference

  1. Set up a Dev Drive on Windows 11 | Microsoft Learn

[컴][유틸] 배경없애주는 프로그램

 

누끼 프로그램 / 앱 / desktop app / 유틸 / 툴 / 도구 /

배경없애주는 프로그램

[컴] markdown 으로 pdf 문서 만들기

마크다운으로 문서 작성 / 워드 / 한글 / 이력서 작성

markdown 으로 pdf 문서 만들기

작업 순서

  1. markdown 으로 글을 쓴다. 여기서는 파일 이름을 resume.md라고 가정하자.

  2. html 로 변환 : Pandoc 사용

    rem resume.md --> resume.html
    pandoc -f markdown -t html < resume.md > resume.html
  3. resume.html 에 css 적용

    <!doctype html>
    <html>
    <head>
        <meta charset="utf-8">
        <style type="text/css">
            ...
        </style>
    </head>
    <body>
        {{ ... }}
    </body>
    </html>
  4. pdf 로 변환 :

    • 간단히 브라우저에서 ’프린트’를 해서, ’pdf 저장’을 택해도 된다. 필자는 firefox 를 이용했다.

    • wkhtmltopdf 사용

      • footer.html 에 page no 를 추가함.
      • footer.html 를 넣고 header를 따로 지정하지 않으면, header 쪽의 여백까지도 사라져버려서 header.html을 지정해줬다.
      rem `resume.html` --> `output.pdf`
      "c:\myapps\wkhtmltopdf.exe"  --header-html header.html --footer-html footer.html --page-size A4 "d:\a\etc\resume\resume.html" f:\output.pdf

wkhtmltopdf

여러 language 에서 사용할 수 있는 library 도 있지만, 바로 사용할 수 있는 exe도 제공한다.

사용한 template 파일

[컴] 윈도우 앱 실행 별칭 Windows App execution aliases

 

윈도우즈

윈도우 앱 실행 별칭 Windows App execution aliases

설정 -> 앱 -> 고급 앱 설정 -> 앱 실행 별칭 에 있는 별칭들은 다음 경로에 있다.

  • %LocalAppData%\Microsoft\WindowsApps
설정 -> 앱 -> 고급 앱 설정 -> 앱 실행 별칭

이것을 추가로 만들려면 mklink로 exe 에 대한 symbolic link 를 만들어준다.

mklink %LocalAppData%\Microsoft\WindowsApps\my_alias_name.exe "the_full_path_of_your_executable_file"

참고로, 이렇게 하면 symbolic link 는 만들어지지만, ’앱 실행 별칭’에서 보이진 않는다.

Reference

  1. Another Way to Create App Execution Alias in Windows 11 | Password Recovery

[컴] widows app 의 URI

윈도우즈 URI / windows11 app uri

widows app 의 URI

windows 에서도 app 에 대한 URI 를 사용할 수 있다. 기본적으로 윈도우즈의 기본앱에 대한 URI 는 아래링크에서 확인할 수 있다.

아래는 자신의 컴퓨터의 모든 URI scheme 을 확인할 수 있는 .bat file 의 내용이다. 필자의 컴퓨터에서는 대략 6분정도 걸렸다.

@For /f "tokens=1* delims=" %%A in ('reg query HKCR /f "URL:*" /s /d ^| findstr /c:"URL:" ^| findstr /v /c:"URL: " ^| Sort') Do @Echo %%A %%B
pause

실행

만약 ms-photo 를 실행하려면, start ms-photo: 로 실행할 수 있다.

reg query HKCR /f "URL:*"

위 batch 를 실행한 결과값의 일부이다. ms 와 관계있는 URI 들을 모아놨다.

...
(기본값)    REG_SZ    URL:microsoft-edge
(기본값)    REG_SZ    URL:microsoft.windows.camera
(기본값)    REG_SZ    URL:microsoft.windows.camera.picker
(기본값)    REG_SZ    URL:microsoft.windows.photos.crop
(기본값)    REG_SZ    URL:microsoft.windows.photos.picker
(기본값)    REG_SZ    URL:microsoft.windows.photos.videoedit
(기본값)    REG_SZ    URL:MicrosoftBing Protocol
(기본값)    REG_SZ    URL:microsoftmusic
(기본값)    REG_SZ    URL:microsoftvideo
(기본값)    REG_SZ    URL:MK Protocol
(기본값)    REG_SZ    URL:mms Protocol
(기본값)    REG_SZ    URL:mms Protocol
(기본값)    REG_SZ    URL:ms-aad-brokerplugin
(기본값)    REG_SZ    URL:ms-actioncenter
(기본값)    REG_SZ    URL:ms-appinstaller
(기본값)    REG_SZ    URL:ms-apprep
(기본값)    REG_SZ    URL:ms-calculator
(기본값)    REG_SZ    URL:ms-clipchamp
(기본값)    REG_SZ    URL:ms-clock
(기본값)    REG_SZ    URL:ms-contact-support
(기본값)    REG_SZ    URL:ms-cortana2
(기본값)    REG_SZ    URL:ms-crossdevice-files
(기본값)    REG_SZ    URL:ms-crossdevice-settings
(기본값)    REG_SZ    URL:ms-crossdevice-share
(기본값)    REG_SZ    URL:ms-cxh
(기본값)    REG_SZ    URL:ms-default-location
(기본값)    REG_SZ    URL:ms-devhome
(기본값)    REG_SZ    URL:ms-device-enrollment
(기본값)    REG_SZ    URL:ms-device-enrollment2
(기본값)    REG_SZ    URL:ms-drive-to
(기본값)    REG_SZ    URL:ms-edu-secureassessment
(기본값)    REG_SZ    URL:ms-eyecontrolspeech
(기본값)    REG_SZ    URL:ms-gamebar
(기본값)    REG_SZ    URL:ms-gamebarservices
(기본값)    REG_SZ    URL:ms-gamingoverlay
(기본값)    REG_SZ    URL:ms-get-started
(기본값)    REG_SZ    URL:ms-getoffice
(기본값)    REG_SZ    URL:ms-holographicfirstrun
(기본값)    REG_SZ    URL:ms-inputapp
(기본값)    REG_SZ    URL:ms-insights
(기본값)    REG_SZ    URL:ms-ipmessaging
(기본값)    REG_SZ    URL:ms-launchremotedesktop
(기본값)    REG_SZ    URL:ms-lwh
(기본값)    REG_SZ    URL:ms-meetnow
(기본값)    REG_SZ    URL:ms-meetnowflyout
(기본값)    REG_SZ    URL:ms-msdt
(기본값)    REG_SZ    URL:ms-newsandinterests
(기본값)    REG_SZ    URL:ms-notepad
(기본값)    REG_SZ    URL:ms-officeapp
(기본값)    REG_SZ    URL:ms-officecmd
(기본값)    REG_SZ    URL:ms-oobenetwork
(기본값)    REG_SZ    URL:ms-outlook
(기본값)    REG_SZ    URL:ms-paint
(기본값)    REG_SZ    URL:ms-pchealthcheck
(기본값)    REG_SZ    URL:ms-penworkspace
(기본값)    REG_SZ    URL:ms-people
(기본값)    REG_SZ    URL:ms-phone
(기본값)    REG_SZ    URL:ms-photos
(기본값)    REG_SZ    URL:ms-powerautomate
(기본값)    REG_SZ    URL:ms-print-addprinter
(기본값)    REG_SZ    URL:ms-print-printjobs
(기본값)    REG_SZ    URL:ms-print-queue
(기본값)    REG_SZ    URL:ms-quick-assist
(기본값)    REG_SZ    URL:ms-retaildemo-launchbioenrollment
(기본값)    REG_SZ    URL:ms-retaildemo-launchstart
(기본값)    REG_SZ    URL:ms-screenclip
(기본값)    REG_SZ    URL:ms-screensketch
(기본값)    REG_SZ    URL:ms-search
(기본값)    REG_SZ    URL:ms-settings
(기본값)    REG_SZ    URL:ms-settings-airplanemode
(기본값)    REG_SZ    URL:ms-settings-bluetooth
(기본값)    REG_SZ    URL:ms-settings-cellular
(기본값)    REG_SZ    URL:ms-settings-emailandaccounts
(기본값)    REG_SZ    URL:ms-settings-language
(기본값)    REG_SZ    URL:ms-settings-location
(기본값)    REG_SZ    URL:ms-settings-lock
(기본값)    REG_SZ    URL:ms-settings-mobilehotspot
(기본값)    REG_SZ    URL:ms-settings-notifications
(기본값)    REG_SZ    URL:ms-settings-power
(기본값)    REG_SZ    URL:ms-settings-privacy
(기본값)    REG_SZ    URL:ms-settings-proximity
(기본값)    REG_SZ    URL:ms-settings-screenrotation
(기본값)    REG_SZ    URL:ms-settings-wifi
(기본값)    REG_SZ    URL:ms-settings-workplace
(기본값)    REG_SZ    URL:ms-stickereditor
(기본값)    REG_SZ    URL:ms-sttoverlay
(기본값)    REG_SZ    URL:ms-taskswitcher
(기본값)    REG_SZ    URL:ms-teams
(기본값)    REG_SZ    URL:ms-to-do
(기본값)    REG_SZ    URL:ms-todo
(기본값)    REG_SZ    URL:ms-unistore-email
(기본값)    REG_SZ    URL:ms-voip-call
(기본값)    REG_SZ    URL:ms-voip-video
(기본값)    REG_SZ    URL:ms-walk-to
(기본값)    REG_SZ    URL:ms-wcrv
(기본값)    REG_SZ    URL:ms-widgets
(기본값)    REG_SZ    URL:ms-windows-search
(기본값)    REG_SZ    URL:ms-windows-store
(기본값)    REG_SZ    URL:ms-windows-store-deskext
(기본값)    REG_SZ    URL:ms-windows-store2
(기본값)    REG_SZ    URL:ms-windowsbackup
(기본값)    REG_SZ    URL:ms-wpc
(기본값)    REG_SZ    URL:ms-wpdrmv
(기본값)    REG_SZ    URL:ms-wxh
(기본값)    REG_SZ    URL:ms-xbet-survey
(기본값)    REG_SZ    URL:ms-xgpueject
...