Skip to content

Instantly share code, notes, and snippets.

View hackeris's full-sized avatar

不是油条 hackeris

View GitHub Profile
@0
0 / bluetooth_serial.md
Last active May 15, 2024 07:01
Connecting a Bluetooth device for serial communication on Arch Linux.

The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.

Prerequisites

The following packages are required:

  • bluez: bluetoothd
  • bluez-utils: bluetoothctl, rfcomm
@typehorror
typehorror / Flask-SQLAlchemy Caching.md
Last active February 15, 2024 14:44
Flask SQLAlchemy Caching

Flask-SQLAlchemy Caching

The following gist is an extract of the article Flask-SQLAlchemy Caching. It allows automated simple cache query and invalidation of cache relations through event among other features.

Usage

retrieve one object

# pulling one User object

user = User.query.get(1)

@DieHertz
DieHertz / any.h
Last active August 9, 2017 11:45
#ifndef any_h
#define any_h
namespace utility {
class any {
struct impl_base {
virtual impl_base* clone() const = 0;
virtual ~impl_base() = default;
};
@DieHertz
DieHertz / typelist.cpp
Created January 14, 2014 12:02
C++11 typelists
struct NullType {};
template <typename T, typename U>
struct TypeList {
using Head = T;
using Tail = U;
};
template <typename...> struct MakeTypeList;