Skip to content

Instantly share code, notes, and snippets.

@h3ssan
h3ssan / Qt5.15 configure options
Created September 4, 2021 07:57
Qt 5.15 available configure options
Usage: configure [options] [assignments]
Configure understands variable assignments like VAR=value on the command line.
Each uppercased library name (obtainable with -list-libraries) supports the
suffixes _INCDIR, _LIBDIR, _PREFIX (INCDIR=PREFIX/include, LIBDIR=PREFIX/lib),
_LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g.,
ICU_PREFIX=/opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata".
It is also possible to manipulate any QMAKE_* variable, to amend the values
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0
import QtQuick.Controls.Material 2.3
Popup {
id: globalPopUpDialog
property var title : "Unknown title"
@Mattemagikern
Mattemagikern / Certificates.go
Created May 9, 2019 08:31
Create x509 certificate chain using Golang. Root CA, Designated CA, server CA
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"math/big"
@lmj0011
lmj0011 / rejson-for-ubuntu.md
Last active November 4, 2024 10:18
Building and Loading the ReJSON v1 Module on Linux Ubuntu 16.04 for Redis

make sure you have at least redis v4.0+

redis-server --version

redis-cli --version

install the build-essential package

apt-get install build-essential

@sethvargo
sethvargo / create-certs.sh
Created June 6, 2018 16:20
Use openssl to create an x509 self-signed certificate authority (CA), certificate signing request (CSR), and resulting private key with IP SAN and DNS SAN
# Define where to store the generated certs and metadata.
DIR="$(pwd)/tls"
# Optional: Ensure the target directory exists and is empty.
rm -rf "${DIR}"
mkdir -p "${DIR}"
# Create the openssl configuration file. This is used for both generating
# the certificate as well as for specifying the extensions. It aims in favor
# of automation, so the DN is encoding and not prompted.
@donno
donno / fetch_vcdist.py
Last active November 16, 2024 06:30
Downloads and extract the Visual C++ Redistributables.
"""Downloads and extract the Visual C++ Redistributables.
This is useful when working with minidump files as the user may be running
with a new different version of the runtime. This script aims to maintain
a copy of the various versions.
Versions are normally added once I encounter them, in November 2022, I added
a rather large back catalogue of versions.
This requires dark.exe from Wix (http://wixtoolset.org/releases/) and
@malekpour
malekpour / Startup.cs
Last active May 30, 2020 17:44
Iris Go vs .NET Core Kestrel in terms of HTTP performance
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Http;
@severin-lemaignan
severin-lemaignan / AnimatedArrow.qml
Last active March 12, 2023 08:29
A example showing how to animate an arrow along an arbitrary path using qml
import QtQuick 2.0
Item {
id: arrow
property var origin: null
property var end: null
property int duration: 2000
property color color: "red"
@codref
codref / go-ssh-reverse-tunnel.go
Last active August 12, 2024 16:54
Go SSH reverse tunnel implementation (SSH -R)
/*
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command:
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123
which opens a tunnel between the two endpoints and permit to exchange information on this direction:
server:8080 -----> client:8080
@etenzy
etenzy / mvc.md
Last active May 17, 2021 18:52
MVC View Model Naming Conventions
  • Model: Singular
  • View: Plural
  • Controller:
    • Plural: If your controller contains at least one action method that handles multiple entities at a single transaction. (resourceful)
    • Singular: example the AccountController is singular because it represents actions (action method) pertaining to a single account only.
  • Route: Plural