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
@Rajssss
Rajssss / format_sdcard.c
Created May 11, 2022 14:27 — forked from dizcza/format_sdcard.c
ESP-IDF format an SD card
#include "ff.h"
#include "vfs_fat_internal.h"
/**
* Usage:
* // See https://github.com/espressif/esp-idf/blob/b63ec47238fd6aa6eaa59f7ad3942cbdff5fcc1f/examples/storage/sd_card/sdmmc/main/sd_card_example_main.c#L75
* esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card);
* format_sdcard(card);
* // proceed without remounting
*/
@Rajssss
Rajssss / mount-ubi-using-mtdram.sh
Created October 15, 2021 19:16 — forked from ndunks/mount-ubi-using-mtdram.sh
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!
@Rajssss
Rajssss / git-auto-sign-commits.sh
Created June 7, 2021 10:14 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r