Skip to content

Instantly share code, notes, and snippets.

View mboyar's full-sized avatar
🎯
Focusing

MURAT BOYAR mboyar

🎯
Focusing
View GitHub Profile
tetet@orangepipc:~$ dmesg | grep fb
[ 0.000000] Kernel command line: console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 cgroup_enable=memory swapaccount=1 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 panic=10 consoleblank=0 enforcing=0 loglevel=1
[ 9.862474] fbtft_device: SPI devices registered:
[ 9.862504] fbtft_device: spidev spi0.0 33000kHz 8 bits mode=0x00
[ 9.862518] fbtft_device: 'fb' Platform devices registered:
[ 9.862602] fbtft_device: Deleting spi0.0
[ 9.863543] flexfb spi0.0: fbtft_request_gpios: 'reset' = GPIO2
[ 9.863580] flexfb spi0.0: fbtft_request_gpios: 'dc' = GPIO71
[ 9.863597] flexfb spi0.0: flexfb_verify_gpios_dc()
[ 9.863610] flexfb spi0.0: fbtft_init_display()
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()
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>
# 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")
rpm2cpio ./somepackage.rpm | cpio -idmv
~~~
#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
@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
#!/bin/bash
src=""
dest=""
TRASH="$HOME/Trashbin/"
ARGC=$#
[[ -d $TRASH ]] || mkdir -v $TRASH
ret=$?
@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