Skip to content

Instantly share code, notes, and snippets.

View AndreVallestero's full-sized avatar
🦀

Andre Vallestero AndreVallestero

🦀
View GitHub Profile
@AndreVallestero
AndreVallestero / wintray.cpp
Created May 28, 2019 13:49
Gets text from applications occupying the windows tray
#include <windows.h>
#include <commctrl.h>
#include <iostream>
int main(void) {
HWND hTrayWnd = FindWindowEx(
FindWindowEx(
FindWindowEx(
FindWindow("Shell_TrayWnd", NULL)
, NULL, "TrayNotifyWnd", NULL)
, NULL, "SysPager", NULL)
@AndreVallestero
AndreVallestero / meson.build
Created August 30, 2019 14:19
Sample meson build file for SDL2 on windows
#clang++ main.cpp -I/usr/include -L/usr/lib64 -lSDL2main -lSDL2 -Xlinker /subsystem:windows
project('hello-triangle', 'cpp')
compiler = meson.get_compiler('cpp')
incdirs = ['C:\usr\include']
libdirs = ['C:\usr\lib64']
libs = ['SDL2', 'SDL2main']
sources = ['main.cpp']
deps = []
@AndreVallestero
AndreVallestero / GCC CFLAGS CCFLAGS CXXFLAGS LDFLAGS
Last active December 5, 2019 21:18
GCC CFLAGS CCFLAGS CXXFLAGS LDFLAGS
GCC CFLAGS CCFLAGS CXXFLAGS LDFLAGS
# -Wl,-O1 is unstable on rk3399
Performance
CFLAGS="-march=native -mtune=native -Ofast -pipe -fno-plt -fvisibility=hidden -flto -Wl,-lfto -s"
LDFLAGS="-Wl,--hash-style=both -Wl,-znow -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--relax -Wl,--enable-new-dtags -Wl,-flto -Wl,-s"
Debug
CFLAGS="-march=native -g3 -ggdb3 -Og -fvisibility=default"
@AndreVallestero
AndreVallestero / meson.build
Created December 20, 2019 16:13
meson build for efl without pkgconfig
project('min-e-calc', 'c')
compiler = meson.get_compiler('c')
incdirs = ['/usr/include/efl-1',
'/usr/include/efl-1/interfaces',
'/usr/include/ecore-1',
'/usr/include/eina-1',
'/usr/include/eina-1/eina',
'/usr/include/eo-1',
'/usr/include/elementary-1',
@AndreVallestero
AndreVallestero / no-tiled.patch
Created February 16, 2020 04:23
Removes tiled-yuv in libva-f4l2-request for aarch64 systems rasing an error
src/Makefile.am | 2 -
src/image.c | 15 +----
src/meson.build | 2 -
src/tiled_yuv.S | 185 --------------------------------------------------------
src/tiled_yuv.h | 30 ---------
5 files changed, 3 insertions(+), 231 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 6448884..9615ded 100644
--- a/src/Makefile.am
src/Makefile.am | 2 -
src/image.c | 15 +----
src/meson.build | 2 -
src/tiled_yuv.S | 185 --------------------------------------------------------
src/tiled_yuv.h | 30 ---------
5 files changed, 3 insertions(+), 231 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 6448884..9615ded 100644
--- a/src/Makefile.am
@AndreVallestero
AndreVallestero / PKGBUILD
Created February 25, 2020 17:41
android-sdk aarch64 PKGBUILD
# Maintainer: Zhang Hai <[email protected]>
# Contributor: Alexander F Rødseth <[email protected]>
# Contributor: Daniel Micay <[email protected]>
# Contributor: Gordin <[email protected]>
# Finding dependencies:
# ELF dependencies:
# cd /lib/ && find /opt/android-sdk/tools/ -type f -executable \
# | LANG=C xargs readelf -d 2>/dev/null \
# | grep -oP '(?<=Shared library: \[).*(?=\])' | LANG=C xargs pacman -Qo \
@AndreVallestero
AndreVallestero / main.c
Created March 8, 2020 17:29
Multi dimensional array cast
char (*sentence_array)[MAX_STR_LEN] = malloc(sizeof(char) * MAX_STR_LEN * sentence_count);
@AndreVallestero
AndreVallestero / bezier-curve-from-points.js
Created March 9, 2020 03:17
Bezier curve from points
/* bezier-spline.js
*
* computes cubic bezier coefficients to generate a smooth
* line through specified points. couples with SVG graphics
* for interactive processing.
*
* For more info see:
* http://www.particleincell.com/2012/bezier-splines/
*
* Lubos Brieda, Particle In Cell Consulting LLC, 2012
@AndreVallestero
AndreVallestero / bdo-welfare-gear.md
Last active March 23, 2020 21:41
bdo welfare gear

BDO Welfare gear

Welfare gear

BDO gear

Cheap gear

Core gear