Skip to content

Instantly share code, notes, and snippets.

View adventurist's full-sized avatar

Emmanuel Buckshi adventurist

View GitHub Profile
2021-09-01 10:20:17.0000000000 ./Leona/4 month/20210901_102014.jpg
2021-09-01 10:20:19.0000000000 ./Leona/4 month/20210901_102017.jpg
2021-09-01 10:20:25.0000000000 ./Leona/4 month/20210901_102023.jpg
2021-09-01 10:20:26.0000000000 ./Leona/4 month/20210901_102025.jpg
2021-09-01 10:20:27.0000000000 ./Leona/4 month/20210901_102026.jpg
2021-09-01 12:14:23.0000000000 ./Leona/4 month/20210901_121325.mp4
2021-09-01 12:14:40.0000000000 ./Leona/4 month/20210901_121438.jpg
2021-09-01 12:14:41.0000000000 ./Leona/4 month/20210901_121439.jpg
2021-09-01 12:17:18.0000000000 ./Leona/4 month/20210901_121530.mp4
2021-09-01 13:45:08.0000000000 ./Leona/4 month/20210901_134505.jpg
@adventurist
adventurist / build_info.log
Created June 13, 2022 15:39
Mac M1 1.7 Testing Build Info
[2022-06-13 08:35:22:476] [distant_commlink] [info] Build info: {"os":"Mac","version":"1.2.1","build":"2","branch":"release-mac-1.2.1","webhid":true} pid: 12189
@adventurist
adventurist / dbus_listen.cpp
Created April 11, 2022 16:31
Dbus power event example
#include <stdio.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus-glib.h>
#include <glib.h>
static DBusHandlerResult dbus_filter (DBusConnection *connection, DBusMessage *message, void *user_data)
{
printf("dbus_filter called");
@adventurist
adventurist / dimensions.cpp
Created January 16, 2022 20:19
dimensions
struct Dimensions
{
static constexpr int square = 1;
static constexpr float landscape = 1.91f;
static constexpr float vertical = 0.8f;
Dimensions(int width_, int height_)
:
ratio(ComputeRatio(width_, height_)),
width(width_),
@adventurist
adventurist / cefsimple_linux.cc
Last active January 11, 2022 08:29
cef simple main
#include "tests/cefsimple/simple_app.h"
#if defined(CEF_X11)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#endif
#include "include/base/cef_logging.h"
#include "include/cef_command_line.h"
#include <future>
@adventurist
adventurist / simple_app.cc
Created December 9, 2021 15:24
cef simple app source
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include "tests/cefsimple/simple_app.h"
#include <string>
#include "include/cef_browser.h"
#include "include/cef_command_line.h"
#include "include/views/cef_browser_view.h"
#include "include/views/cef_window.h"
#include "include/wrapper/cef_helpers.h"
@adventurist
adventurist / simple_app.h
Created December 9, 2021 15:23
cef simple app header
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_TESTS_CEFSIMPLE_SIMPLE_APP_H_
#define CEF_TESTS_CEFSIMPLE_SIMPLE_APP_H_
#include "include/cef_app.h"
// Implement application-level callbacks for the browser process.
class SimpleApp : public CefApp, public CefBrowserProcessHandler {
public:
SimpleApp(uint64_t parent);
@adventurist
adventurist / running_lists.cpp
Last active November 22, 2021 04:27
Running lists
bool ShouldSwap(std::vector<int> list, int i)
{
bool more_than_one_val = (list.size() > 1);
bool last_value_bigger = (list.back() > i);
bool second_last_smaller = (list[list.size() - 2] < i);
return (more_than_one_val && last_value_bigger && second_last_smaller);
}
void TestLists()
@adventurist
adventurist / window_msg_seq.txt
Created January 27, 2021 04:32
Healthy window message sequence
WM_GETMINMAXINFO
WM_NCCREATE
WM_NCCALCSIZE
WM_CREATE
WM_SHOWWINDOW
WM_WINDOWPOSCHANGING
WM_NCPAINT
WM_ERASEBKGND
WM_WINDOWPOSCHANGED
WM_SIZE
@adventurist
adventurist / window_debug.hpp
Created January 27, 2021 03:52
print window messages
#pragma once
#include <string>
inline std::string get_window_message(uint32_t code)
{
switch (code)
{