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 / 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)
__ALIGN_END const unsigned char stlogo[9174]=
{
0x42,0x4d,0xd6,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,
0x00,0x00,0x50,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x01,0x00,0x10,0x00,0x03,0x00,
0x00,0x00,0xa0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

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
@Rajssss
Rajssss / checkpatch_with_eclipse.txt
Created February 15, 2021 05:35
Using checkpatch with eclipse CDT with source files.
Run->External Tools->External Tools Configurations...
In the External Tools Configurations Window
Name: checkpatch
Location: Set your checkpatch.pl location (linux_tree/scripts/checkpatch.pl)
Arguments: -f --no-tree ${resource_loc}
Click Apply.
Now click on any source file that you want to use checkpatch for, click run->external tools->checkpatch
@Rajssss
Rajssss / retarget_stdio
Last active September 2, 2022 09:07
Retargetting STDIO (printf, scanf) to UARTx in STM32 MCUs.
/*
* retarget_stdio.c
*
* Created on: 17-Oct-2020
* Author: Raj.S
*/
#include "stm32f4xx_hal.h"
#include "retarget_stdio.h"
#include <stdio.h>
#include <errno.h>
#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 {} \;
@Rajssss
Rajssss / SparseMatrix.c
Created August 24, 2019 19:00
Sparse Matrix Representation in 3 Column Method in C....
#include <stdio.h>
#include <stdlib.h>
// Structure Definations
struct element {
int i;
int j;
int data;
};
@Rajssss
Rajssss / Doubly_Circular_LL
Created August 10, 2019 14:06
C programm of Doubly Linked List + Circular Linked List, With Display and Reverse Display capabilities...
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int A;
struct Node *next;
struct Node *prev;
} *first, *last;
@Rajssss
Rajssss / Insert_Delete_LL
Last active August 7, 2019 12:19
Go through the code first and read the comments....
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int A;
struct Node *next;
} *first;
typedef struct Node Node;
@Rajssss
Rajssss / Add_Two_Poly_LL
Last active August 7, 2019 12:20
C Programe to Add Two Polynomials in Linked List....
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
struct Poly
{
int Coeff;
int Pow;
struct Poly *next;
} *first, *second, *Sum;