Skip to content

Instantly share code, notes, and snippets.

View botanegg's full-sized avatar

Konstantin Goncharik botanegg

View GitHub Profile
@mbinna
mbinna / effective_modern_cmake.md
Last active September 16, 2024 15:44
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@systemed
systemed / gist:be2d6bb242d2fa497b5d93dcafe85f0c
Last active April 10, 2024 03:49
Routing algorithm implementations
(Dijkstra and plain A* are generally not included here as there are thousands of
implementations, though I've made an exception for rare Ruby and Crystal versions,
and for Thor, Mapzen's enhanced A*. )
A* Ruby https://github.com/georgian-se/shortest-path
A* Crystal https://github.com/petoem/a-star.cr
A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla
NBA* JS https://github.com/anvaka/ngraph.path
NBA* Java https://github.com/coderodde/GraphSearchPal
NBA* Java https://github.com/coderodde/FunkyPathfinding
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active September 24, 2024 13:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ygotthilf
ygotthilf / jwtRS256.sh
Last active September 24, 2024 14:39
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@ericaroy
ericaroy / Android Home
Last active August 26, 2024 00:35
Setting Android Home on Mac
Note for me to remember how to set Android Home on Mac
Open Terminal and type in..
nano ~/.bash_profile
Add the below paths
The path should be where your android installation is located
export ANDROID_HOME=/Users/username/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Save file and type in terminal...
source ~/.bash_profile
@pmslavin
pmslavin / sdl2_opengl.c
Last active December 27, 2015 14:49 — forked from exavolt/sdl2_opengl.c
/*
Fixed out-of-scope SDL_Renderer*. Now compiles with
$CC sdl2_opengl.c -o sdl2_opengl -lSDL2 -lGL -lGLU
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@mathieue
mathieue / install-nginx-munin-debian.sh
Created October 2, 2012 12:19
Install nginx with munin plugins on debian
apt-get install munin-plugins-extra libio-all-lwp-perl
echo "[nginx_*]
env.url http://localhost/nginx_status
" > /etc/munin/plugin-conf.d/nginx
vi /etc/nginx/sites-available/default
# in server section
location /nginx_status {
stub_status on;
access_log off;