Skip to content

Instantly share code, notes, and snippets.

View gilson27's full-sized avatar
🎯
Focusing

Gilson Varghese gilson27

🎯
Focusing
View GitHub Profile
@gilson27
gilson27 / gist:1116c44867379288baf26ab0ab85b1c6
Created December 2, 2020 05:53
OpenCV Cross compiling for Jetson nano
Cross compile OpenCV with quemu in Ubuntu
-------------------------------------------------------------------------------------
https://github.com/zhj-buffer/Cross-Compile-Jetson
https://kbeckmann.github.io/2017/05/26/QEMU-instead-of-cross-compiling/
https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.1.1_Jetson.sh#L40
Use first two links for creating a virtual machine for cross compiling
The last link contains instructions for cross compiling
@gilson27
gilson27 / ffmpeg_command_snippets.txt
Last active February 20, 2021 15:58
My quick command snippets (ffmpeg)
///////////////////////////////////////////// FFMPEG snippets ////////////////////////////////////////////////////
ffmpeg -f rawvideo -vcodec rawvideo -s 1920x1080 -r 30 -pix_fmt yuv420p -i crowdRun_D.yuv -codec:v v210 output.mov
ffmpeg -i input.avi -c:v libx264 -crf 19 -preset slow -c:a libfaac -b:a 192k -ac 2 out.mp4
==================================================================================================================
Decode 10 bit mov capture as yuv v210
------------------------------------------------------------------------------------------------------------------
@gilson27
gilson27 / decrypt.js
Created October 26, 2016 09:04
Nodejs encrypt decrypt
/**
* Module dependencies.
*/
var crypto = require("crypto");
//var debug = require("debug")("crypto_object");
/*
* The Javascript object for handling tasks related to encryption, decryption and Hashing
*/
@gilson27
gilson27 / ffmpeg_install.sh
Created October 13, 2016 18:37
Install FFMPEG on ubuntu 14.04
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ffmpeg
@gilson27
gilson27 / Mocha_Test_Coverage.sh
Created October 10, 2016 13:34
Test coverage with Istambul
npm install -g istanbul
istanbul cover _mocha -- -R spec
cat coverage/lcov-report/index.html
@gilson27
gilson27 / time.c
Created August 16, 2016 04:25
A simple C function to print time
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#define LENGTH 256
void print_time(char *buf)
{
time_t t;
@gilson27
gilson27 / cryptoWrapper.js
Last active August 14, 2016 07:17
Simpler crypto module in nodejs for AES and SHA
var crypto = require("crypto");
var cryptoWrapper = {
algorithm: 'aes-128-cbc',
passphrase: 'gilsonvarghese',
/*
* @param textToEncrypt {String} The input to be encrypted
* @return {String} the encrypted value of the text
*/
@gilson27
gilson27 / arm_cross_compile_node.sh
Last active August 14, 2016 07:06
Steps to install nodejs from source
#Change the filenames
NODE_TARRED="node-vx.y.z.tar.gz"
NODE_DIR="node-vx.y.z"
#Untar repository
tar -xvpf $NODE_TARRED
cd $NODE_DIR
#Create a directory to install binaries
mkdir install