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 / 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;
};
#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 / 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>
@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

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
__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,
@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)
@Rajssss
Rajssss / redshift.conf
Last active June 9, 2021 06:26
Redshift linux multi monitor config for no identical monitor with different color temp and brightness. Requires two conf files.
$ redshift -c ~/.config/redshift.conf
; Primary Monitor
; Global settings
[redshift]
temp-day=4200K
temp-night=3900k
transition=1
;gamma=0.8:0.7:0.8
@Rajssss
Rajssss / colab_build_systems_setup.ipynb
Last active October 12, 2021 05:11
Colab_Build_Systems_Setup.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Rajssss
Rajssss / param_update.c
Created September 20, 2021 09:25
airpurifier ui param update
#include <stdlib.h>
#include <time.h>
#include "datoms_airpurifier_main.h"
#include "main_screen.h"
void datoms_test_param_update(void);
void humidity_update_param(lv_task_t *task);
void pm_update_param(lv_task_t *task);