Skip to content

Instantly share code, notes, and snippets.

View RouHim's full-sized avatar
⌨️

Rouven Hi! RouHim

⌨️
View GitHub Profile
@RouHim
RouHim / sensorbridge_update.json
Last active February 28, 2024 04:18
sensorbridge_update.json
{
"version": "0.41.13",
"notes": "chore(deps): update rust crate rayon to 1.9.0",
"pub_date": "2024-02-28T04:18:42Z",
"platforms": {
"linux-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVTb2Z6WEFTVStDSmpmeE5NM3cycnZZbkF2VWZUMm1Dd0FCOTB3c245MWV6cXBuVnUySExOWmxVSjQzQTdSS2JtdU5RSHZGZndsYzNkVGFHN09qT1gzMnZRc0R1U2x2bndjPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA5MDkzNjIwCWZpbGU6c2Vuc29yLWJyaWRnZV8wLjQxLjEzX2FtZDY0LkFwcEltYWdlLnRhci5negpMbDJDamdURzluNk5ZMTEyUlI4dTgrZTdkUmpRblZJbzhUZXRubm8vZzRISlkxNmhFRms5dUJ2QjJKN3QyTTRVd2hNK2o1T05DYUx6MndxK3lzUzJCdz09Cg==",
"url": "https://github.com/RouHim/sensor-bridge/releases/download/0.41.13/sensor-bridge_0.41.13_amd64.AppImage.tar.gz"
},
"windows-x86_64": {
@RouHim
RouHim / aida_64_shared_memory.rs
Created July 12, 2023 17:32
Read sensor values via shared memory from aida64 using rust
use std::ffi::OsStr;
use std::fmt;
use std::os::windows::ffi::OsStrExt;
use quick_xml::events::Event;
use quick_xml::Reader;
use winapi::um::memoryapi::{FILE_MAP_READ, MapViewOfFile, OpenFileMappingW};
use winapi::um::winnt::HANDLE;
use serde::{Deserialize, Serialize};
@RouHim
RouHim / screen-sharing-chrome-gnome-waland.txt
Last active July 12, 2023 17:34
Enable screen sharing in Chrome using GNOME Wayland
# Set this to chrome flag to true
chrome://flags/#enable-webrtc-pipewire-capturer
# Set this chrome flag to Wayland
chrome://flags/#ozone-platform-hint
# Make sure these packages are installed
gnome-remote-desktop pipewire-media-session xdg-desktop-portal xdg-desktop-portal-gnome
# Make sure the following service is stared as user
@RouHim
RouHim / binvec_update.json
Last active March 14, 2024 01:43
BinVec latest version
{
"version": "1.3.1",
"notes": "chore(deps): update dev-drprasad/delete-older-releases action to v0.3.3",
"pub_date": "2024-03-14T01:43:08Z",
"platforms": {
"linux-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVSakd1VHMxck9sNzFvQlRPY1FnNmtzbnN4UVZGZGZlRmVLNU5FREV2ODJGaEtOSEYxMXhLa08yWnNBbkNIZTF2dVZHTm5OSVdXMWp2amZ6RUVLV1dVd0tkZCs2Q2RPNWdNPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzEwMzgwNTA3CWZpbGU6YmluLXZlY18xLjMuMV9hbWQ2NC5BcHBJbWFnZS50YXIuZ3oKc3BzMUhVQlM3UWNsOWM1d0kxY1V3b2QxUjZKUGtjU1lWR0lYV0V1VmdnVGRkcjlQYmVpK01sdjFtM1doZkZmVjVRQXhaZEV6cFJxUW9GUk9kZDYxQkE9PQo=",
"url": "https://github.com/RouHim/binvec/releases/download/v1.3.1/binvec_1.3.1_amd64.AppImage.tar.gz"
},
"windows-x86_64": {
@RouHim
RouHim / persister.go
Created August 15, 2020 15:34
GO | ArangoDB | Return all documents of a collection
func GetAllDocuments(collectionName string) (foundDocuments []interface{}) {
ctx := driver.WithQueryCount(context.Background())
query := "FOR d IN " + collectionName + " RETURN d"
cursor, err := database.Query(ctx, query, nil)
if err != nil {
log.Fatal(err)
}
_ = cursor.Close()
foundDocuments = make([]interface{}, 0)
@RouHim
RouHim / persister.go
Created August 15, 2020 15:32
GO | ArangoDB | Retrieve typed documents for a query with a parameter
func RetrieveDocumentsForDate(date string) {
ctx := context.Background()
query := "FOR d IN table FILTER d.date == @date RETURN d"
bindVars := map[string]interface{}{
"date": date,
}
cursor, err := database.Query(ctx, query, bindVars)
if err != nil {