Skip to content

Instantly share code, notes, and snippets.

@aharonamir
aharonamir / launch.json
Created September 3, 2020 17:08
setup for cpp debug
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Test Sqlite",
"type": "cppdbg",
"request": "launch",
@aharonamir
aharonamir / Dockerfile
Created September 2, 2020 15:59
Multi-Stage vscode Dockerfile
# MULTI STAGE BUILD
FROM aharonamir/vscode-remote-gcc-vcpkg as builder
# install project specific dependencies
# install deb packages
USER root
COPY ./script/install-deb-dependencies.sh /usr/
RUN chmod +x /usr/install-deb-dependencies.sh
RUN apt-get update
@aharonamir
aharonamir / CMake
Last active September 2, 2020 15:41
Cmake vcpkg integration
...
# add vcpkg toochain
include(/home/vscode/vcpkg/scripts/buildsystems/vcpkg.cmake)
# find packages:
# some packages in vcpkg will require to add find_package
# e.g find_package(nlohmann_json CONFIG REQUIRED)
# vcpkg will notify that when installing the specific package
# libs
@aharonamir
aharonamir / Dockerfile.develop
Created September 1, 2020 12:54
vscode-remote-develop Dockerfile
FROM aharonamir/vscode-remote-gcc-vcpkg
# install project specific dependencies
# install deb packages
USER root
COPY ./script/install-deb-dependencies.sh /usr/
RUN chmod +x /usr/install-deb-dependencies.sh
RUN apt-get update
RUN /usr/install-deb-dependencies.sh
# Clean up APT when done.
@aharonamir
aharonamir / search.html
Last active August 17, 2020 05:20
search-exercise
<!DOCTYPE html>
<html>
<head>
<title>Search</title>
<style>
/* Your CSS */
#container {
min-height: 100vh;
font-size: larger;
}
@aharonamir
aharonamir / Dockerfile
Last active June 27, 2018 12:39
Multi-Stage Dockerfile
# MULTI STAGE BUILD
# start from building develop image
# and then run the compile
FROM aharonamir/dev-cpp:4.9 as builder
# install project specific dependencies
USER root
COPY ./dependencies/install-dependencies.sh /usr/
RUN chmod +x /usr/install-dependencies.sh
RUN apt-get update
@aharonamir
aharonamir / launch.json
Created June 21, 2018 14:29
debug config
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (GDBSERVER)",
"type": "cppdbg",
"request": "launch",
"miDebuggerServerAddress": "localhost:2000",
"preLaunchTask": "start-gdbserver",
@aharonamir
aharonamir / tasks.json
Created June 21, 2018 14:17
vscode tasks
{
"version": "2.0.0",
"tasks": [
{
"label": "start develop env",
"type": "shell",
"command": "docker-compose -f develop-compose.yml run --service-ports --name devenv dev-image bash",
"problemMatcher": []
},
{
@aharonamir
aharonamir / develop-compose.yml
Created June 21, 2018 14:06
develop compose file
version: '2'
services:
##### the develop image you've build
### don't forget to open ports for your app
dev-image:
image: your-company/your-project/develop
ports:
- "2000:2000"
- "50010:50010"
privileged: true
FROM aharonamir/dev-cpp:4.9
USER root
COPY ./doc/install-dependencies.sh /usr/
RUN chmod +x /usr/install-dependencies.sh
RUN apt-get update
RUN /usr/install-dependencies.sh
# Clean up APT when done.