Skip to content

Instantly share code, notes, and snippets.

View kjelloh's full-sized avatar

kjelloh

View GitHub Profile
@kjelloh
kjelloh / tasks.json
Created November 29, 2022 09:13
macOS VSCode tasks.json for system clang++, Brew and macPorts installed Clang-15 and Gcc-12 builds (as of 221129)
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang++ build active file",
"command": "/usr/bin/clang++",
"args": [
"-fcolor-diagnostics",
"-fansi-escape-codes",
  • If you get an error generating Xcode build tool-chain
kjell-olovhogdal@Kjell-Olovs-Mac-Pro build % cmake -G Xcode ..
CMake Error:
  Xcode 1.5 not supported.


CMake Error: Could not create named generator Xcode
kjell-olovhogdal@Kjell-Olovs-Mac-Pro ShotTaker % brew install ffmpeg
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
elvis ghcup reshape tidy-viewer vermin
==> Updated Formulae
Updated 214 formulae.
==> Downloading https://ghcr.io/v2/homebrew/core/imath/manifests/3.1.4
@kjelloh
kjelloh / AdventOfCode201217.cpp
Created January 4, 2021 19:14
Advent of Code 2020 day 17 part 1 and 2 :)
//
// main.cpp
// AdventOfCode201217_1
//
// Created by Kjell-Olov Högdal on 2021-01-04.
//
#include <iostream>
#include <sstream>
#include <string>
@kjelloh
kjelloh / AdventOfCode201216_2.cpp
Created January 2, 2021 16:56
Advent of Code 2020 day 16 part 2 - loops in loops in loops eldorado!!
//
// main.cpp
// AdventOfCode201216_2
//
// Created by Kjell-Olov Högdal on 2021-01-02.
//
#include <iostream>
#include <sstream>
#include <vector>
@kjelloh
kjelloh / AdventOfCode201214_2.cpp
Created December 29, 2020 20:40
AdventOfCode 2020 Day 14 part 2
//
// main.cpp
// AdventOfCode201214_2
//
// Created by Kjell-Olov Högdal on 2020-12-29.
//
#include <iostream>
#include <sstream>
#include <numeric>
//
// Kudos to "Hey Programmer" youtube solution https://youtu.be/4_5mluiXF5I
// main.cpp
// AdventOfCode201213_2
//
// Created by Kjell-Olov Högdal on 2020-12-28.
//
#include <iostream>
#include <sstream>
@kjelloh
kjelloh / AdventOfCode201202_1.cpp
Created December 27, 2020 18:13
Advent of Code 2020 day 2 part 2
//
// main.cpp
// AdventOfCode201202_2
//
// Created by Kjell-Olov Högdal on 2020-12-26.
//
#include <iostream>
#include <sstream>
#include <string>
@kjelloh
kjelloh / AsventOfCode201201_2.cpp
Created December 27, 2020 18:11
Advent of Code 2020 day 1 part 2
//
// main.cpp
// AdventOfCode201201_2
//
// Created by Kjell-Olov Högdal on 2020-12-26.
//
#include <iostream>
#include <sstream>
#include <vector>
@kjelloh
kjelloh / AdventOfCode201208_2.cpp
Created December 27, 2020 18:07
Advent of Code 2020 day 8 part 2 - somewhat over-complicated solution (but I learned a lot :) )
//
// main.cpp
// AdventOfCode201208_2
//
// Created by Kjell-Olov Högdal on 2020-12-27.
//
#include <iostream>
#include <sstream>
#include <vector>