This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using FFMPEG | |
--- | |
ffmpeg -i input.mp4 -s 320x240 -b 64k -vcodec mpeg1video -acodec copy output.mp4 | |
Change parameters to get tradeoff quality and size | |
- Resolution via -s 320x240 | |
- Bitrate via -b 64k | |
Using AVCONV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To convert dts file into dtb | |
<kernel-source>/scripts/dtc/dtc -I dts -O dtb <dts_file> -o <dtb_file> | |
# To convert dtb to dts | |
<kernel-source>/scripts/dtc/dtc -I dtb -O dts <dtb_file> -o <dts_file> | |
# Both of above commands are using dtc built with linux kernel source. | |
# However you can also use dtc binary comes with ubuntu packages. For this you | |
# need to install following package: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script is interested to take | |
# - a flag | |
# - an option which takes a parameter | |
arg_list=$(getopt -o bp: --long boolean,param: -- "$@") | |
eval set -- "$arg_list" | |
while [ $# -gt 0 ] ; do | |
case "$1" in | |
-b | --boolean) | |
echo "Parameter @ flag" | |
shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Type=Application | |
Name=EclipseC++ | |
GenericName=Eclipse | |
Comment=Eclipse for development | |
Exec=/path/to/eclipse | |
Icon=/path/to/icon.xpm | |
Terminal=false | |
MimeType=text/plain; | |
Categories=Development;IDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yocto build was showing a warning of "QA Issue: No GNU_HASH in the elf binary". | |
- The fix was to make sure that linker command line used by the respective application is using parameters used by Yocto build system. | |
- Just for information $(LDFLAGS) used by Yocto is having -Wl,--hash-style=gnu. | |
Ref: For inside of GNU_HASH: https://blogs.oracle.com/ali/entry/gnu_hash_elf_sections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inherit extrausers | |
EXTRA_USERS_PARAMS = "usermod -P hello root;" | |
- This sets the root password to "hello". | |
- These lines can be added into your core-image-base.bbappend file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pre-built package (# Ubuntu 18.04.3 LTS) | |
sudo apt update | |
sudo apt install cppcheck | |
# Build from code | |
wget https://github.com/danmar/cppcheck/archive/2.1.tar.gz | |
tar zxvf 2.1.tar.gz | |
cd cppcheck-2.1 | |
mkdir build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ubuntu 18.04.3 LTS | |
# Installation | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake git zlib1g-dev libncurses5-dev llvm-6.0-dev libclang-6.0-dev libclang-6.0-dev clang-6.0 | |
git clone https://github.com/include-what-you-use/include-what-you-use.git iwyu.git | |
cd iwyu.git | |
git checkout clang_6.0 | |
mkdir -p build | |
cd build | |
cmake -DIWYU_LLVM_ROOT_PATH=/usr/lib/llvm-6.0 .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A simple function which takes | |
# no parameters and returns nothing | |
function fun1() { | |
echo "A simple function" | |
} | |
# A function which takes parameters | |
# and return nothing | |
function fun2() { | |
echo "Fun:: Number of parameters: ${#@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple example of how dup2 can be used | |
const char* msg = "Text written by standard file descriptor\n"; | |
int fd = open("dup2_test.txt", O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); | |
write(fd, msg, strlen(msg)); | |
/* Map stdout to our file */ | |
dup2(fd, STDOUT_FILENO); | |
printf("Text written by dup @ stdout file descriptor\n"); | |
close(fd); |
NewerOlder