Skip to content

Instantly share code, notes, and snippets.

View JavierJF's full-sized avatar

Javier Jaramago Fernández JavierJF

  • ProxySQL
  • Sevilla, España
View GitHub Profile
Test failed for this case "latin7"->character_set_results.
mysql data {
"autocommit": "OFF",
"character_set_client": "utf8mb4",
"character_set_connection": "latin7",
"character_set_database": "utf8mb4",
"character_set_results": "latin7",
"collation_connection": "latin7_general_ci",
"group_concat_max_len": "4096",
@JavierJF
JavierJF / conanfile.py
Created July 4, 2019 01:35
Example of conanfile.py consuming dependencies
from conans import ConanFile, CMake, tools
import os
class VaultServiceConan(ConanFile):
name = "VaultService"
version = "0.1"
license = "GNU GPL v3"
url = "https://gitlab.com/philabs/VaultService"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "tests": [True, False]}
@JavierJF
JavierJF / VoiceProfileEnum.cpp
Created July 2, 2019 17:01
Windows SAPI voice profile properties enumeration
#include "pch.h"
#include <iostream>
#include <io.h>
#include <fcntl.h>
#include <Shlobj.h>
#include <string>
CComPtr<ISpObjectToken> createIspObjectToken() {
@JavierJF
JavierJF / StartMenuLayout.cs
Created March 20, 2018 18:52
Error: Setting StartMenu layout using C# - dynamically
/*!
* GPII Windows 10 Start Menu Layout Setter.
*
* Copyright 2018 Raising the Floor - International
*
* Licensed under the New BSD license. You may not use this file except in
* compliance with this License.
*
* The research leading to these results has received funding from the European Union's
* Seventh Framework Programme (FP7/2007-2013)
@JavierJF
JavierJF / ExportStartLayout.cs
Last active April 23, 2024 19:11
Setting StartMenu layout using C# - statically
/*!
* GPII Windows 10 Start Menu Layout Setter.
*
* Copyright 2018 Raising the Floor - International
*
* Licensed under the New BSD license. You may not use this file except in
* compliance with this License.
*
* The research leading to these results has received funding from the European Union's
* Seventh Framework Programme (FP7/2007-2013)
@JavierJF
JavierJF / StartMenuLayout.js
Last active March 20, 2018 18:17
Bug: Simple function to set the StartMenu layout using Node. Powershell, and edge-ps.
gpii.windows.startMenuLayout.exportLayout = function () {
var promise = fluid.promise();
var psScript = edge.func('ps', function () {
/*
$VerbosePreference = "continue"
$ErrorActionPreference = "Stop"
$GPII_Data_Path = Join-Path $env:LOCALAPPDATA "GPII"
$CurrentLayout = Join-Path $GPII_Data_Path "menuLayouts\current_layout.xml"
@JavierJF
JavierJF / StartMenuLayout.cs
Last active March 20, 2018 18:21
Bug: Simple solution for setting the StartMenu layout using C# and PowerShell
/*!
* GPII Windows 10 Start Menu Layout Setter.
*
* Copyright 2018 Raising the Floor - International
*
* Licensed under the New BSD license. You may not use this file except in
* compliance with this License.
*
* The research leading to these results has received funding from the European Union's
* Seventh Framework Programme (FP7/2007-2013)
@JavierJF
JavierJF / TryIconSetter.cs
Last active March 20, 2018 18:09
Simple Solution to trigger TrayIcon through settings with UIA
/*
* App.cs
* Copyright 2018 Raising the Floor - International
*
* Licensed under the New BSD license. You may not use this file except in
* compliance with this License.
*
* The R&D leading to these results received funding from the
* Department of Education - Grant H421A150005 (GPII-APCP). However,
* these results do not necessarily represent the policy of the
@JavierJF
JavierJF / wmi-brightness.cpp
Created September 28, 2017 16:57
WMI Client POC function for setting brightness
#include <objbase.h>
#include <windows.h>
#include <stdio.h>
#include <wbemidl.h>
#include <comdef.h>
#include <string>
#pragma comment(lib, "wbemuuid.lib")
#pragma comment(lib, "comsuppw.lib")
@JavierJF
JavierJF / screenbright.cpp
Last active September 27, 2017 15:09
Get current windows brightness in Windows (DDC/CI)
#include <Windows.h>
#include <PhysicalMonitorEnumerationAPI.h>
#include <HighLevelMonitorConfigurationAPI.h>
#include <iostream>
#include <cstdint>
#include <string>
// Returns the last Win32 error, in string format. Returns an empty string if there is no error.
std::string GetLastErrorAsString()
{