Skip to content

Instantly share code, notes, and snippets.

View Nafees10's full-sized avatar

Nafees Hassan Nafees10

  • Lahore, Punjab, Pakistan
  • 15:16 (UTC +05:00)
View GitHub Profile
@varqox
varqox / recording_application_and_microphone.md
Last active August 16, 2024 15:09
How to record multiple applications and microphone into one audio file on Linux using PulseAudio

How to record multiple applications and microphone into one audio file on Linux

Step 0. Terminology

Sinks are for output, sources are for input. To stream source to sink a loopback must be created. More shall you find there.

Step 1. Create output sink that will be recorded

Our output sink will be named recording.

pacmd load-module module-null-sink sink_name=recording sink_properties=device.description=recording
@fnky
fnky / ANSI.md
Last active November 4, 2025 00:05
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
// Connect the gy-521 accelerometer to a digispark attyiny85 and light an LED when tipping it to the side (along X)
// Wire this up with gy-521:attiny85 as vcc:5v, gnd:gnd, sda:p0, scl:p3; sda and scl each have a 4.7k pull-up resistor
#include <TinyWireM.h>
const int MPU_addr=0x68; // I2C address of the MPU-6050
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;
void mpu_init() {
TinyWireM.beginTransmission(MPU_addr);