Skip to content

Instantly share code, notes, and snippets.

View mboyar's full-sized avatar
🎯
Focusing

MURAT BOYAR mboyar

🎯
Focusing
View GitHub Profile
@mboyar
mboyar / ffmeg-concat-merge-convert
Last active April 26, 2023 15:38
Concat AVI videos, merge WAV audio and generate MP4 output in one-line by using FFMPEG
ffmpeg -i 'concat:output.1.avi|output.2.avi|output.3.avi|output.4.avi|output.5.avi' -i audio.wav -c:v copy -c:a aac output.mp4
@mboyar
mboyar / gist:9e49f734ac960fac631ce47107b92513
Created January 13, 2021 09:15
find mingw cc1.exe call
for i in $(find . * -type f -executable); do line=$(strings $i | grep cc1.exe); [[ ! -z $line ]] && printf "$i: " && echo $line && echo "/////"; done
#!/bin/bash
src=""
dest=""
TRASH="$HOME/Trashbin/"
ARGC=$#
[[ -d $TRASH ]] || mkdir -v $TRASH
ret=$?
@mboyar
mboyar / gist:c3bb8c518c299dfd15e81c591f944d73
Created November 11, 2019 09:22
find source file and create header file-set
find . -name mb_msggen* | sed -En "s/\.c/\.h/p" | sed -En "s/src/inc/p" | xargs touch
~~~
#Backup
$ sudo dd if=/dev/sdX | gzip -c > /path/to/backup.img.gz &
$ while((1)); do sudo kill -SIGUSR1 $(pidof dd); sleep 1; if [[ $(pidof dd) == "" ]]; then break; fi; done
~~~
#Restore
$ gunzip -c /path/to/backup.img.gz | dd of=/dev/sdY
$ while((1)); do sudo kill -SIGUSR1 $(pidof dd); sleep 1; if [[ $(pidof dd) == "" ]]; then break; fi; done
~~~
#See https://wiki.archlinux.org/index.php/Dd
rpm2cpio ./somepackage.rpm | cpio -idmv
# Simon Game - based on 101Computing - www.101computing.net/microbit-simon-game
from microbit import *
import music
import random
plus = Image("00000:"
"00900:"
"09990:"
"00900:"
"00000")
aortopi@orangepiplus2e:~$ bin2fex /boot/bin/orangepiplus2e.bin | grep spi
fexc-bin: /boot/bin/orangepiplus2e.bin: version: 0.1.2
fexc-bin: /boot/bin/orangepiplus2e.bin: size: 38012 (83 sections)
[spi0]
spi_used = 1
spi_cs_bitmap = 1
spi_mosi = port:PC00<3><default><default><default>
spi_miso = port:PC01<3><default><default><default>
spi_sclk = port:PC02<3><default><default><default>
spi_cs0 = port:PC03<3><1><default><default>
aortopi@orangepiplus2e:~$ dmesg | grep fb
[ 3.946673] fbtft_device: SPI devices registered:
[ 3.946692] fbtft_device: spidev spi0.0 33000kHz 8 bits mode=0x00
[ 3.946703] fbtft_device: 'fb' Platform devices registered:
[ 3.946767] fbtft_device: Deleting spi0.0
[ 3.947537] flexfb spi0.0: fbtft_request_gpios: 'reset' = GPIO2
[ 3.947566] flexfb spi0.0: fbtft_request_gpios: 'dc' = GPIO71
[ 3.947578] flexfb spi0.0: flexfb_verify_gpios_dc()
[ 3.947589] flexfb spi0.0: fbtft_init_display()
[ 3.947599] flexfb spi0.0: fbtft_reset()