Skip to content

Instantly share code, notes, and snippets.

View piotrkundu's full-sized avatar

Piotr Kundu piotrkundu

View GitHub Profile
  1. Create the key:
ssh-keygen -t ed25519 -C "example@example.com"
  1. Choose the default location by pressing enter: ~/.ssh/id_ed25519

  2. Copy the content of the key

cat ~/.ssh/id_ed25519.pub | clip
@piotrkundu
piotrkundu / msys2_with_git_for_windows.md
Last active April 3, 2024 06:36
Full MINGW64 environtment with MSYS2 instead of Git Bash for Windows

BACKGROUND (WHY?)

I switch dev-environments every single year with each customer having their own setup. Git on Linux and MacOSX just works most of the time - there are some SSH keys needed to be setup, but "sudo apt-get" or "brew install" mostly does the trick.

Git for Windows is a box a sourcery, so when you install that you will get a version of slim MSYS2, MinGW64 and most importantly bash and git that runs from the bash. This is what you need 9 out of 10 times, if you ONLY need to use git to manage your source and then use other/external toolchains like VS Code, VS2022 or Windows Powershell or Command to compile your sh.ttt I mean stuff.

Then that 10th out of 10 times, you want to compile windows applications from the same terminal that you run git - just like you do on linux or OSX. If you are running Windows alone then having two terminals, one for git (with mingw64/msys2) and one for your ms whatever the compiler name is for C++.

@piotrkundu
piotrkundu / VideoCanvas.cpp
Created February 7, 2022 15:40 — forked from rvega/VideoCanvas.cpp
A simple video player widget with nanogui and libvlc
#include <nanogui/screen.h>
#include <nanogui/window.h>
#include <nanogui/glcanvas.h>
#include <nanogui/layout.h>
#include <nanogui/opengl.h>
#include <vlc/vlc.h>
#include <iostream>
#include <mutex>
@piotrkundu
piotrkundu / BB-ADS7846-00A0.dts
Created November 8, 2021 10:15 — forked from ankitdaf/BB-ADS7846-00A0.dts
Adding XPT2046 ( ADS7846 ) Touchscreen Support to Beaglebone Black Kernel version 4.1.0-rc5-bone3
/dts-v1/;
/plugin/;
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/pinctrl/am33xx.h>
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
@piotrkundu
piotrkundu / integrating-fastbuild-with-ue4.md
Created October 14, 2021 23:36 — forked from hillin/integrating-fastbuild-with-ue4.md
Integrating FASTBuild with Unreal Engine 4

FASTBuild is an open-source distributed build system, which could be a free alternative to Incredibuild. Unreal Engine 4 (UE4) does not support FASTBuild natively, however it's not hard to integrate it manually.

Integrate FASTBuild with UE4

Install FASTBuild

We assume you already have the full UE4 source code. First you'll need to grab the latest FASTBuild tools from here. We use v0.93 Windows x64 version in this tutorial. Download it and extract all the files. Here you have several choices:

  • Place the files under any folder which could be found with your system's PATH environment variable. To see where these folders are, run the PATH command in a command prompt window;
  • Place the files under the Engine\Binaries\ThirdParty\FASTBuild folder of your engine. This is the recommended place;
  • Place the files anywhere you like. This is not recommended because you'll have to hard-code the path later.
@piotrkundu
piotrkundu / client.py
Created May 21, 2021 09:17 — forked from yoavram/client.py
Example of uploading binary files programmatically in python, including both client and server code. Client implemented with the requests library and the server is implemented with the flask library.
import requests
#http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file
url = "http://localhost:5000/"
fin = open('simple_table.pdf', 'rb')
files = {'file': fin}
try:
r = requests.post(url, files=files)
print r.text
// make_vector.hpp
//
// Copyright (c) 2019 Tristan Brindle (tcbrindle at gmail dot com)
// Distributed under the Boost Software License, Version 1.0. (See
// http://www.boost.org/LICENSE_1_0.txt)
#include <type_traits>
#include <vector>
namespace tcb {