Skip to content

Instantly share code, notes, and snippets.

View kafeg's full-sized avatar
💭
In C++ we trust!

Vitaly kafeg

💭
In C++ we trust!
View GitHub Profile
@seyedmmousavi
seyedmmousavi / build_qt_5_15_openssl_3.md
Last active April 13, 2024 16:30
How to build Qt 5.15 Community against OpenSSL 3

How to build Qt 5.15 Community with OpenSSL 3

The Qt v5.15 Community doesn't support OpenSSL 3 by default. You will face some issues at runtime if you attempt to build it with OpenSSL 3. This gist explains how to do it by yourself.

Brief

  1. Apply two attached patches
  2. Install OpenSSL 3
  3. Config the Qt with installed OpenSSL like this:
 ..\configure -prefix h:\mousavi\Qt\5.15.10\win32-msvc2019-x86 -debug-and-release -skip qtwebengine -openssl-runtime OPENSSL_PREFIX="H:\mousavi\OpenSSL-Win32"`
@FlorianHeigl
FlorianHeigl / junos-netflow.cmd
Last active March 6, 2024 12:41
Configure Juniper NFX NexGen NetFlow (inline)
set system ntp server ntp1.ispname.net
set interfaces ge-1/0/2 unit 0 family inet sampling input
set interfaces ge-1/0/2 unit 0 family inet sampling output
set services flow-monitoring version9 template ipv4-test ipv4-template
set forwarding-options sampling instance test-ins family inet input rate 100
set forwarding-options sampling instance test-ins family inet input run-length 19
set forwarding-options sampling instance test-ins family inet output flow-server 172.16.xx.xx port 2055
set forwarding-options sampling instance test-ins family inet output flow-server 172.16.xx.xx version9 template ipv4-test
set forwarding-options sampling instance test-ins family inet output inline-jflow source-address 192.168.x.x
@roalcantara
roalcantara / xcode-uninstall.sh
Created October 24, 2020 11:41
xcode-uninstall
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf /Applications/Xcode.app
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Developer
rm -rf ~/Library/MobileDevice
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
@TheCherno
TheCherno / Instrumentor.h
Last active May 5, 2024 16:58
Basic Instrumentation Profiler
//
// Basic instrumentation profiler by Cherno
// Usage: include this header file somewhere in your code (eg. precompiled header), and then use like:
//
// Instrumentor::Get().BeginSession("Session Name"); // Begin session
// {
// InstrumentationTimer timer("Profiled Scope Name"); // Place code like this in scopes you'd like to include in profiling
// // Code
// }
@BenJuan26
BenJuan26 / elite-dangerous-simple.ino
Last active November 4, 2022 06:47
An Arduino sketch for Elite Dangerous that receives data from the game and keeps its switches in sync with the game state.
#include <ArduinoJson.h>
#include <Key.h>
#include <Keypad.h>
// Allow 5 seconds of lag from the device, to the game, and back to the device.
#define BUTTON_SYNC_TIME 5000
// Each button press will last about 100ms.
#define BUTTON_HOLD_TIME 100
@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active April 23, 2024 17:11 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@thomaslmiller
thomaslmiller / QtArm64Patch.patch
Created July 19, 2018 23:14
Diff for Qt5 dev branch for building Arm64 Windows Desktop Apps
Submodule qtbase 519fcb38a2..705dee9621:
diff --git a/qtbase/mkspecs/common/msvc-desktop.conf b/qtbase/mkspecs/common/msvc-desktop.conf
index b7d2eecc82..755d92149c 100644
--- a/qtbase/mkspecs/common/msvc-desktop.conf
+++ b/qtbase/mkspecs/common/msvc-desktop.conf
@@ -22,6 +22,10 @@ contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64
QMAKE_COMPILER_DEFINES += _WIN64
}
+contains(QMAKE_TARGET.arch, arm64) {
@tycho
tycho / qt.patch
Last active October 19, 2023 12:36
Diff for Qt 5.10.1 for Windows 10 ARM64
This patch implements numerous changes to make the Qt 5.10.1 build work for the new ARM64 target in
Visual Studio 2017. This change also includes a couple of new batch scripts, in case you want to build
on the target machine itself (very slow) or build on an x86/x86_64 host (much faster).
You can build with something like this:
> configure_src_on_x86_host.bat
> jom -f Makefile Debug Release
diff --git a/configure_src_on_target.bat b/configure_src_on_target.bat
new file mode 100644
# Docker の ubuntu:16.04 に AArch64 用のクロスコンパイル環境をビルドする
# 2017/06/29
# これ以外のファイルは、configure 時の出力ログです。
# sudo docker run --name cross_compile -it ubuntu:16.04 /bin/bash
# Docker 環境のため、rootで動かしていることに注意してください。
# 作業環境の整備
apt update
apt upgrade