Skip to content

Instantly share code, notes, and snippets.

@pitcer
pitcer / CMakeLists.txt
Last active June 14, 2020 17:39
CMakeLists file
cmake_minimum_required(VERSION 3.17)
project(project)
file(GLOB files "src/*.cpp")
add_executable(binary ${files})
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
-Wall \
@pitcer
pitcer / .editorconfig
Created March 15, 2020 18:21
EditorConfig for Racket projects (spaces)
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
@pitcer
pitcer / Makefile
Last active April 3, 2020 21:51
Makefile for C++
COMPILER = g++
COMPILER_FLAGS = \
-std=c++17 \
-Wall \
-Werror \
-Wextra \
-pedantic \
-Wpedantic \
-Wold-style-cast \
-finline-functions \
@pitcer
pitcer / .editorconfig
Last active June 26, 2020 18:37
Default .editorconfig file
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@pitcer
pitcer / Makefile
Last active March 1, 2020 15:23
Makefile for C
COMPILER = gcc
COMPILER_FLAGS = \
-xc \
-std=c11 \
-Wextra \
-Wall \
-Werror \
-Wfloat-equal \
-Wundef \
-Wshadow \
#!/usr/bin/env bash
sizes=(16 32 64 128 256 512 1024 2048 4096 8192)
function export-png {
sourceFile=$1
size=$2
rsvg-convert -f png -o "$size.png" -w $size -h $size --no-keep-image-data "$sourceFile"
}