Skip to content

Instantly share code, notes, and snippets.

View Rajssss's full-sized avatar
🎯
Writing Drivers

Rajesh Kumbhakar Rajssss

🎯
Writing Drivers
View GitHub Profile
@the-spyke
the-spyke / pipewire.md
Last active June 20, 2025 14:54
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@smalinux
smalinux / 0001-mychar-hello-world-character-driver.patch
Last active January 18, 2021 17:35
Embox hacking - 101 tutorial
From 39991fa0f75e7e6302f17e4882ff2d2a18f36cae Mon Sep 17 00:00:00 2001
From: Sohaib Mohammed <[email protected]>
Date: Sat, 16 Jan 2021 06:48:31 +0200
Subject: [PATCH 1/1] mychar - hello world character device
---
src/kernel/Mybuild | 7 +++++++
src/kernel/mychar.c | 31 +++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 src/kernel/mychar.c
#1000 duplicated fames error fix,
find . -name *.mp4 ! -path *.mp4.* -exec ffmpeg -i {} -s 1280x720 -movflags faststart -profile:v high -level 4.2 -max_muxing_queue_size 9999 -movflags frag_keyframe+empty_moov -max_interleave_delta 0 -vf mpdecimate -c:a copy -vsync vfr {}.mp4 \; -exec rm {} \;
#Ilegal Seek fix adn out of queue error fix (faster encoding)
find . -name *.mp4 ! -path *.mp4.* -exec ffmpeg -i {} -s 1280x720 -movflags faststart -profile:v high -level 4.2 -max_muxing_queue_size 9999 -movflags frag_keyframe+empty_moov {}.mp4 \; -exec rm {} \;
#run from any dir, will find .mp4 in all subdir and process it
find . -name *.mp4 -exec ffmpeg -i {} -s 1280x720 -movflags faststart -profile:v high -level 4.2 {}.mp4 \; -exec rm {} \;

Screen Quick Reference

Wait a minute, why would anyone use 'screen', and what is it anyway?

Well, because it's both AWESOME and FUN!!

It lets you keep your own session running on all the servers you already use, and chances are, it's probably already installed and waiting for you! (since 1987!)

Basic

| Description | Command |

@cnlohr
cnlohr / esp32_aes_example.c
Created November 7, 2018 19:50
Example of using hardware AES 256 Crypto in CBC mode on the ESP32 using ESP-IDF
#include <string.h>
#include <stdio.h>
#include <hwcrypto/aes.h>
/*
For Encryption time: 1802.40us (9.09 MB/s) at 16kB blocks.
*/
static inline int32_t _getCycleCount(void) {
int32_t ccount;
@jjvillavicencio
jjvillavicencio / setup.sh
Last active June 12, 2025 16:41
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@robot9706
robot9706 / UBI attach
Created August 15, 2018 20:48
How to mount an UBI image
#http://www.linux-mtd.infradead.org/faq/ubi.html
#sudo apt-get install mtd-tools
#sudo -i
#UBI mount
mknod /dev/mtd0 c 90 0
modprobe nandsim first_id_byte=0x2c second_id_byte=0xac third_id_byte=0x00 fourth_id_byte=0x15
dd if=ubi.img of=/dev/mtd0 bs=2048
@markuskreitzer
markuskreitzer / README.md
Created July 30, 2018 16:15
How to connect a Raspberry Pi to a WPA2 Enterprise Network

How to connect a Raspberry Pi to a WPA2 Enterprise Network

tags: Auburn, Auburn University, WPA2, WPA2 Enterprise

Auburn University is gracious enough to provide instructions to Ubuntu users on how to connect their hosts to the Auburn University WiFi Network.

Many Universities use WPA2 Enterprise authentication on their networks. This allow you to track WHO is connected where and have granular control over who's able to access the WiFi network.

For tinkerers and experimenters with Raspberry Pi, Particle Photon, and other embedded systems, this poses a problem because many simplier IoT devices do not support WPA2 Enterprise natively or not without some hassle.

Raspbian Jesse and earlier will display a WPA2 Enterprise network from its dropdown list, but it will be greyed out. The workaround is to manually connect to it:

@ndunks
ndunks / mount-ubi-using-mtdram.sh
Created July 19, 2018 03:24
How to mount UBI image using mtdram kernel module on linux/debian
#!/bin/bash
if [ ! -d files ]; then
# Make the content
echo "Generating root content.."
mkdir files
echo "$(date)" > files/date.txt
echo "Another content" > files/other.txt
fi
#These config are based by Nand device that you will use!
@grantstephens
grantstephens / Flashing OpenWRT.md
Last active November 5, 2023 10:21
TP-Link TL-WR902AC v3 OpenWRT Setup

Important Links:

Flash instruction:

The only way to flash LEDE image in TL-WR902AC v3 is to use tftp recovery mode in U-Boot:

  1. Configure PC with static IP 192.168.0.66/24 and tftp server.
  2. Rename "openwrt-ramips-mt76x8-tplink_tl-wr902ac-v3-squashfs-tftp-recovery.bin" to "tp_recovery.bin" and place it in tftp server directory.