Skip to content

RogerKSI/advent-of-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent-of-code

Vscode config - code-runner

Note: Need to create cookies.txt with "session=<YOUR_ADVENT_OF_CODE_SESSION>" as its content

{
    "code-runner.saveFileBeforeRun": true,
    "code-runner.saveAllFilesBeforeRun": true,
    "code-runner.executorMap": {
        "cpp": "cd $dir && (echo $(wc -l < $fileNameWithoutExt.in) && cat $fileNameWithoutExt.in) > $fileNameWithoutExt.cin && (echo $(wc -l < $fileNameWithoutExt.in.test) && cat $fileNameWithoutExt.in.test) > $fileNameWithoutExt.cin.test && g++-12 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt $fileNameWithoutExt.cin && $dir$fileNameWithoutExt $fileNameWithoutExt.cin.test > $fileNameWithoutExt.out.test",
        "python": "cd $dir && python3 $fileName $fileNameWithoutExt.in && python3 $fileName $fileNameWithoutExt.in.test > $fileNameWithoutExt.out.test",
        "javascript": "cd $dir && node $fileName $fileNameWithoutExt.in && node $fileName $fileNameWithoutExt.in.test > $fileNameWithoutExt.out.test"
    },
    "code-runner.clearPreviousOutput": true,
    "code-runner.ignoreSelection": true,
    "code-runner.executorMapByFileExtension": {
        ".in": "cd $dir && wget -q --no-cookies --header \"Cookie: $(cat ./../cookies.txt)\" https://adventofcode.com/$(basename $dirWithoutTrailingSlash)/day/$fileNameWithoutExt/input -O $fileNameWithoutExt.in.test"
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published