Skip to content

Instantly share code, notes, and snippets.

@KunYi
KunYi / .bashrc
Created October 15, 2020 05:23
somethings in my bashrc
# for yocto download
if [ -d ~/yocto_cache/download ]; then
export DL_DIR=/home/kunyi/yocto_cache/download
export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} DL_DIR"
fi
if [ -d ~/yocto_cache/sstate ]; then
export SSTATE_DIR=/home/kunyi/yocto_cache/sstate
export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} SSTATE_DIR"
fi
@KunYi
KunYi / fix_code_update.sh
Created October 16, 2020 06:10
for fixed mismatch issues of visual studio code when run apt update
#!/bin/bash -e
#
# for fixed mismatch issues of visual studio code when run apt update
#
wget http://packages.microsoft.com/repos/vscode/dists/stable/InRelease
sudo mv InRelease /var/lib/apt/lists/packages.microsoft.com_repos_vscode_dists_stable_InRelease -vf
wget http://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages
sudo mv Packages /var/lib/apt/lists/packages.microsoft.com_repos_vscode_dists_stable_main_binary-amd64_Packages -vf
@KunYi
KunYi / multiple_ssh_setting.md
Last active October 19, 2020 09:48 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
@KunYi
KunYi / gist:6920a9f386436dfef754441655f04129
Created November 4, 2020 11:26
build libubox and install log
root@SRG-3352C:~/libubox/build# make install
[ 35%] Built target ubox
[ 39%] Built target blobmsg_json
[ 43%] Built target blobmsg_json-static
[ 79%] Built target ubox-static
[ 83%] Built target json_script
[ 87%] Built target jshn
[ 91%] Built target uloop_lua
[ 95%] Built target ustream-example
[100%] Built target json_script-example
@KunYi
KunYi / gist:40504a998d5872852ad24a3324e437ee
Created November 4, 2020 11:35
OpenWRT uci build and install log for debian buster
root@SRG-3352C:~/uci/build# make install
[ 35%] Built target uci
[ 45%] Built target cli
[ 80%] Built target uci-static
[ 90%] Built target ucimap
[100%] Built target uci_lua
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/include/uci.h
-- Installing: /usr/local/include/uci_config.h
@KunYi
KunYi / gist:728f4c5184e5dd819545b5acf24a6264
Created November 4, 2020 11:42
ubus build & install for debian buster log
root@SRG-3352C:~/ubus/build# make
[ 29%] Built target ubusd_library
[ 55%] Built target ubus
[ 62%] Built target cli
[ 70%] Built target ubusd
Scanning dependencies of target ubus_lua
[ 74%] Building C object lua/CMakeFiles/ubus_lua.dir/ubus.c.o
[ 77%] Linking C shared module ubus.so
[ 77%] Built target ubus_lua
Scanning dependencies of target client
@KunYi
KunYi / test_overlay.sh
Created November 17, 2020 07:20
overlayfs testing script
~# cat overlay.sh
#!/bin/sh -e
modprobe overlay
mkdir -p /overlay
mount -t tmpfs tmpfs /overlay
mkdir -p /overlay/blk
@KunYi
KunYi / deployNode_xlsx.go
Last active November 22, 2020 09:17
the golang code for deploy device node on chirpstak application server 3.x
package main
//
// the code modify from https://forum.chirpstack.io/t/add-nodes-automatically-to-loraserver/5522/8
// 1'st row is cell title
// ProfileID, AppId, NAME, Descriptions, DevEUI, AppKey, strNwkKey, 1GenApplicationKey
//
import (
"context"
@KunYi
KunYi / cp_kernel.sh
Created December 16, 2020 08:38
imx8mm kernel update with external module install
#!/bin/bash
if [ -d /media/kunyi/rootfs ] ; then
cd /home/kunyi/srgmx8mm/linux-srgmx8/
sudo -H cp ./arch/arm64/boot/Image.gz /media/kunyi/rootfs/boot -vf
sudo -H cp ./arch/arm64/boot/dts/freescale/srg-mx8mm.dtb /media/kunyi/rootfs/boot -vf
sudo -H make modules_install INSTALL_MOD_PATH=/media/kunyi/rootfs
cd /home/kunyi/srgmx8mm/xr_usb_serial_common_lnx-3.6-and-newer-pak
sudo -H make -C /home/kunyi/srgmx8mm/linux-srgmx8 M=$PWD modules_install INSTALL_MOD_PATH=/media/kunyi/rootfs
@KunYi
KunYi / update_tar.sh
Created December 16, 2020 08:42
imx8mm develop just update kernel/u-boot for sdcard booting
update_tar.sh
#!/bin/bash
origin="/home/kunyi/srgmx8mm"
mkdir -p ${origin}/rootfs
mkdir -p ${origin}/rootfs/boot
cd /home/kunyi/srgmx8mm/linux-srgmx8/
sudo -H cp ./arch/arm64/boot/Image.gz ${origin}/rootfs/boot -vf