Skip to content

Instantly share code, notes, and snippets.

@HoriLiu
HoriLiu / gc_repack_prune
Last active March 12, 2024 06:01
git gc optimal
git remote prune origin && git repack && git prune-packed && git reflog expire --expire=1.month.ago && git gc --aggressive
croc command
croc relay --ports 443
croc --relay 192.168.205.99:443 sned "MAN.3_03. VMG-015-A5CO_WBS_20240311.mpp"
croc --relay 192.168.205.99:443
AD23=>setup private license server
@HoriLiu
HoriLiu / No space left on device
Last active September 15, 2023 13:55
Arch Linux “No space left on device.”
##裝置上已無多餘空間
df -h
mount -o remount,size=4G,noatime /tmp
df -h
@HoriLiu
HoriLiu / BudgieArch
Last active December 15, 2022 15:48
VMware Archlinux budgie-desktop minimum install
# Set password by
passwd
systemctl start sshd.service
# Check ip address by
ifconfig
# Use SSH from terminal to ip.address.of.target
ssh root@ip.address.of.target
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZjdmMGNmMDEtNzQxMy00YmFmLWI1ZWItZWEyMWQzNTNmYjE5%40thread.v2/0?context=%7b%22Tid%22%3a%22d852d5cd-724c-4128-8812-ffa5db3f8507%22%2c%22Oid%22%3a%220ccd7b86-c8b0-49a9-b295-58fe05992423%22%7d
@HoriLiu
HoriLiu / AutoSAR SC3
Last active May 20, 2022 08:00
AutoSAR SC3 Configuration
https://www.youtube.com/watch?v=A9ssJ4YTeSA
https://blog.csdn.net/qq_25920091/article/details/107140898
https://support.vector.com/sys_attachment.do?sys_id=6af05b3e872ab8948816dd383cbb354a&sysparm_viewer_table=kb_knowledge&sysparm_viewer_id=7fd58be4876ef054b9f233770cbb3543
https://www.semanticscholar.org/paper/Freedom-from-Interference-for-AUTOSAR-based-ECUs%3A-a-Haworth-Jordan/f5ad014ef6d3d4088babcee769ca9d7c50366959
https://stackoverflow.com/questions/65558006/how-can-i-configure-mpumemory-protection-unit-for-an-os-task-in-vector-autosar
##Set path to your conda installed location
export PATH="/opt/anaconda/bin:$PATH"
or permanent setting
echo 'export PATH="/opt/anaconda/bin:$PATH"'>>~/.bashrc
source .bashrc
##anaconda-navigator use QT5, Fixed macbook hidpi tiny font issue, refer from https://wiki.archlinux.org/index.php/HiDPI#Qt_5
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2
@HoriLiu
HoriLiu / Anaconda Proxy Setup
Created January 10, 2017 01:28
Python Anaconda Proxy Setup via .condarc file on Windows
#Create a .condarc file at: C:\Users\username folder.
http://conda.pydata.org/docs/config.html#the-conda-configuration-file-condarc
Example: conda config --add channels r
use copy con .condarc file if does not exist at above folder.
File content is:
proxy_servers:
@HoriLiu
HoriLiu / BudgieDebian
Last active November 28, 2018 18:46
Debian budgie-desktop
#Get debian-testing-amd64-netinst.iso in
http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/
#Setup OS then Reboot
https://github.com/neurite/debian-setup/wiki/Debian-Installation
#Install Budgie Desktop
sudo apt-get update
sudo apt-get install gdm3 budgie-desktop synaptic gedit gnome-tweak-tool xfce4-terminal
sudo systemctl enable gdm3
@HoriLiu
HoriLiu / Build Micropython in Archlinux
Last active April 28, 2018 11:58
Dev Env STM32F401 by PYB Nano
Install gcc-arm-none-eabi-bin in Archlinux's AUR
sudo pip install pyusb --pre
git clone https://github.com/micropython/micropython.git
Merge & modify ./stmhal/boards/PYBV11/.* for PYB Nano Board
#Edit linux udev setting for stm32 bootloader dfu (USB PID/VID) driver as below, and set pyb.bootloader() by upy command:
https://gist.github.com/HoriLiu/afb0e6d8ddb0bbe372dc1de0bb118ad0
cd micropython
@HoriLiu
HoriLiu / web-servers.md
Created October 6, 2017 14:32 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000