Skip to content

Instantly share code, notes, and snippets.

View Markismus's full-sized avatar

Markismus Markismus

View GitHub Profile
@Markismus
Markismus / how_to_bluetooth.md
Created September 19, 2023 17:37 — forked from yejun/how_to_bluetooth.md
Use pulseaudio as bluetooth speaker on archlinux

Install packages

  • bluez
  • bluez-utils
  • pulseaudio-bluetooth

Enable bluetooth

Edit /etc/bluetooth/main.conf, uncomment following lines

import os
import re
import sys
import zlib
from struct import unpack
OFFSET = 0x6B4
"""
@Markismus
Markismus / Homoglyphs.md
Created October 13, 2022 15:06 — forked from StevenACoffman/Homoglyphs.md
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
12:52:56.737 -> SHTC3 Basic Readings for two i2c lines
12:52:56.737 -> Beginning sensor for line 0. Result = Nominal
12:52:56.737 -> Beginning sensor for line 1. Result = Nominal
12:52:56.737 -> SHT4X Readings on I2C-line 0.
12:52:56.770 -> Serial Number: 262690345
12:52:56.770 -> BME280 Readings on I2C-line 0.
12:52:56.869 -> SensorID is: 0x60: BME280!
12:52:56.903 -> DHT22 Sensor
12:52:56.903 -> Running loop, count 1. ( Delay between counts is 5000 ms.)
12:52:57.035 -> Temperature BME280 0:20.81°C
#include <SensirionI2CSht4x.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <math.h>
#include "SparkFun_SHTC3.h" // Click here to get the library: http://librarymanager/All#SparkFun_SHTC3
#include <Adafruit_BME280.h>
#define sp Serial.print
#define spln Serial.println
#define ArrayLength(x) sizeof(x)/sizeof(x[0])
Mem: 122596K used, 3600K free, 168K shrd, 0K buff, 39476K cached
CPU: 23% usr 46% sys 0% nic 30% idle 0% io 0% irq 0% sirq
Load average: 0.44 0.58 0.47 1/142 13503
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
13498 10578 root R 3232 3% 23% top -b -n 1
797 1 root S 39924 32% 8% {hdrv_zwave} HCBv2 hdrv_zwave [OK] [C36303AE SIS 3.67] [S1|N1]
783 1 root S 301m 244% 0% {hcb_comm} HCBv2 hcb_comm [OK] [18 clients] [S1|N1]
778 1 root S 169m 137% 0% /qmf/sbin/qt-gui -platform linuxfb -plugin Tslib
788 1 root S 34620 27% 0% {happ_thermstat} HCBv2 happ_thermstat [OK] [S20|N1]
796 1 root S 34508 27% 0% {hdrv_p1} HCBv2 hdrv_p1 [OK] [!connected] [S1|N1]

Onyx Boox Image extractor

This extractor allows you to read the image content without owning an Onyx Boox device

Running the script

Please use a Debian based linux device to run the script. Please follow the steps below:

  • Open the the table of supported device on the browser, and find the MODEL column of your desired device
  • Open download.sh, and replace DEVICE_NAME with your name of your desired device
  • Run download.sh
/**
* simplemde v1.11.2
* Copyright Next Step Webs, Inc.
* @link https://github.com/NextStepWebs/simplemde-markdown-editor
* @license MIT
*/
.CodeMirror {
color:#000
}
.CodeMirror-lines {
@Markismus
Markismus / vimdiff.md
Created May 5, 2021 16:23 — forked from mattratleph/vimdiff.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@Markismus
Markismus / default.prop
Created January 12, 2021 14:07
HOW TO: Modify boot.img to allow usb debugging from recovery adb
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.sys.usb.config=adb
ro.adb.secure=0