Skip to content

Instantly share code, notes, and snippets.

View yisonPylkita's full-sized avatar
👻
Just a normal, beautiful day

Wojciech Bartnik yisonPylkita

👻
Just a normal, beautiful day
  • Warsaw, Poland
View GitHub Profile
@yisonPylkita
yisonPylkita / mousemove.py
Created July 14, 2017 10:52 — forked from phoboslab/mousemove.py
Python script to move the mouse cursor in windows with constant speed
import sys
import time
import win32api
if (len(sys.argv) < 4):
print "Usage: python mousemove.py dx dy speed"
sys.exit()
current = win32api.GetCursorPos()
cx = sx = current[0]
@yisonPylkita
yisonPylkita / on_scope_leave.hpp
Last active September 25, 2017 13:05
Execute code on scope leave
/// @file on_scope_leave.hpp
/// @brief Sane way to handle C-style cleanups in C++
/// @author Wojciech Bartnik <yisonPylkita@gmail.com
///
/// Lets assume you have C-style function `int open_port(const char *port_name)`
/// and this function returns a file descriptor to opened device port.
/// Normally you would need to write code like this
///
/// int port_fd = open_port("/dev/ttyUSB0");
/// try {
@yisonPylkita
yisonPylkita / byte_converter.hpp
Created October 18, 2018 17:41
Loading uint16_6 and uint32_t from little/big endian memory
#pragma once
#include <cstdint>
#if !defined(__ORDER_LITTLE_ENDIAN__)
#error "Only little endian systems are supported"
#endif
// All of these functions are constexpr (c++11 compatibile and above)
// Generated code - https://godbolt.org/z/Tz7Wvg
namespace byte_converter {

Keybase proof

I hereby claim:

  • I am yisonpylkita on github.
  • I am yisonpylkita (https://keybase.io/yisonpylkita) on keybase.
  • I have a public key ASCGeN39Zuj42tsxsDlHyG2XM1n4LUGiG4huqLyfiW9Omgo

To claim this, I am signing this object:

Create VM

multipass launch 22.04 -n primary -c 4 -m 4G -d 25G
multipass shell

Instal system packages