Skip to content

Instantly share code, notes, and snippets.

View mmatyas's full-sized avatar

Mátyás Mustoha mmatyas

  • University of Szeged, Department of Software Engineering
  • Szeged, Hungary
  • 04:00 (UTC +02:00)
View GitHub Profile
@mmatyas
mmatyas / bench.cpp
Last active November 12, 2023 13:41
For Pegasus issue #1089
// Based on https://gist.github.com/Motherboard/9bce170327140a709dd40ac23bd863fa
#include <QDirIterator>
#include <chrono>
#include <filesystem>
#include <iostream>
#include <functional>
#include <dirent.h>
@mmatyas
mmatyas / nginx.conf
Created November 18, 2017 11:27 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mmatyas
mmatyas / pi2
Last active July 1, 2017 09:23
Qt build flags for Pegasus
/src/configure
-opensource
-confirm-license
-release
-strip
-no-rpath
-make libs
-no-pch
-static
-verbose
@mmatyas
mmatyas / config.toml
Created June 12, 2017 10:45
Rust AArch64 config
[build]
host = ["aarch64-unknown-linux-gnu"]
target = ["aarch64-unknown-linux-gnu"]
docs = false
/*
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely.
@mmatyas
mmatyas / gist:b775b83908cbdfc6551ff79d8bf0b0ef
Created May 23, 2016 10:41
arm-linux-gnueabihf make check log
~/rustc_autoteszt/buildom$ make check
cfg: version 1.10.0-dev (cde0fa5f6 2016-05-19)
cfg: build triple arm-unknown-linux-gnueabihf
cfg: host triples arm-unknown-linux-gnueabihf
cfg: target triples arm-unknown-linux-gnueabihf
cfg: host for arm-unknown-linux-gnueabihf is arm
cfg: os for arm-unknown-linux-gnueabihf is unknown-linux-gnueabihf
cfg: no good valgrind for arm-unknown-linux-gnueabihf
cfg: using CC=ccache gcc (CFG_CC)
cfg: disabling valgrind run-pass tests
@mmatyas
mmatyas / aarch64fail_log_full
Created May 19, 2016 10:13
Rust tests fail on AArch64
~/rustc_autoteszt/rust/buildom $ make check
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "hu_HU.UTF-8",
LC_MONETARY = "hu_HU.UTF-8",
LC_CTYPE = "hu_HU.UTF-8",
LC_ADDRESS = "hu_HU.UTF-8",
LC_TELEPHONE = "hu_HU.UTF-8",
@mmatyas
mmatyas / mat4.rs
Created May 17, 2016 08:50
Rust matrix multiplication example
// Based on
// https://gist.githubusercontent.com/csherratt/7634597/raw/b05699f444ab552eb79a7f7c0e1c5ac235c5222c/mat4.rs
// from
// https://csherratt.github.io/csherratt/blog/2013/11/24/matrix-multiply-in-rust/
struct Mat4 {
dat: [[f32; 4]; 4]
}
impl Mat4 {
@mmatyas
mmatyas / Android.mk
Last active October 4, 2015 13:22
SMW Android build
SUPPORT_JPG := false
SUPPORT_PNG := true
SUPPORT_WEBP := false
SUPPORT_MOD_MODPLUG := false
SUPPORT_MOD_MIKMOD := false
SUPPORT_MP3_SMPEG := false
SUPPORT_OGG := true
SUPPORT_TIMIDITY := false
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs
index 0c3700b..a14eeff 100644
--- a/src/x11/window/mod.rs
+++ b/src/x11/window/mod.rs
@@ -421,10 +421,18 @@ impl Window {
builder.parent as ffi::Window
};
+ // creating the color map
+ let cmap = unsafe {