Skip to content

Instantly share code, notes, and snippets.

View rockavoldy's full-sized avatar

Akhmad Maulana Akbar rockavoldy

View GitHub Profile

Pagination with Ellipsis

Says you have total pages = 12

  1. Current page = 1
1, 2, 3, ..., 12
  1. Current page = 2
1, 2, 3, 4, ..., 12

AnyFC F7

Specification

  • STM32F745VGT6 100lqfp at 216MHz
  • MPU6000 IMU connected via SPI bus
  • 10 PWM outputs
  • 6 PWM inputs (inputs 3 and 4 shared with UART6)
  • 8 UART and VCP port
  • External I2C Bus
  • CAN Bus
  • External SPI bus (pins shared with UART4 and UART5)
@rockavoldy
rockavoldy / fix-rtl8111-not-work.md
Last active June 7, 2025 15:04
Fix RTL8111 Not working correctly in the new kernel

Fix RTL8111 Not working correctly with the new kernel (Ubuntu 22.04)

https://askubuntu.com/questions/1325854/activation-of-network-connection-failed-fixes-when-reboot-from-windows

Somehow, it's work again when i try to connect the LAN on the other ethernet devices

Fix

  1. Install r8168-dkms from apt with command sudo apt install dkms r8168-dkms to replace current module r8169
  2. Reboot
  3. If the issue still exist, then there is a chance, that this issue is from MSI/MSIX intterupt (not sure what, just a note)
@rockavoldy
rockavoldy / 0-pylint-for-odoo.md
Last active September 23, 2022 03:31
pylint things

Pylint for odoo

  1. Install pylint and pylint-odoo with pip
python3 -m pip install pylint
# and install plugin pylint-odoo from OCA repository
python3 -m pip install --upgrade git+https://github.com/oca/pylint-odoo.git
  1. pylint-odoo already have default configuration that you can run easily with
python3 -m pylint --load-plugins=pylint_odoo -d all -e odoolint 
@rockavoldy
rockavoldy / Odoo11-on-Mac-M1.md
Last active March 21, 2024 15:20
Install odoo on mac M1

Odoo 11 on Mac M1

Installation

Install pyenv first with pyenv-installer

# need to be forced because it conflict with jpeg-turbo
brew install jpeg && brew link jpeg --force
# same, need to be forced because it conflict with lzlib
brew install zlib && brew link zlib --force
# install postgresql and start the services, so it will run at login
@rockavoldy
rockavoldy / keep-your-footer-on-the-bottom-of-the-page.md
Last active September 13, 2022 19:55
Keeping your footer on the bottom of the page
@rockavoldy
rockavoldy / systemd-service-to-run-go-app.md
Last active June 4, 2022 20:12
Create systemd service to run Go apps

Create Systemd services to run Go apps

  1. Create new file with extension .service inside directory /lib/systemd/system/, in this example, i have rainsensor.service
  2. Copy below structure, and do some changes as you wish
[Unit]
Description=rainsensor

[Service]
@rockavoldy
rockavoldy / debrick-mi-router-4a-basic.md
Last active May 11, 2023 16:38
Debrick Mi Router 4A Basic

Install (and Debrick) Mi Router 4A Basic with OpenWRT

Make sure your router is Mi Router 4A Basic 100Mbps NOT Gigabit version

  1. Downgrade first with this firmware v2.18.28.
  2. Setup TFTP Server and DHCP Server, see below for macOS
  3. Rename firmware above to test.bin and place it inside TFTP directory
  4. Change IP Address ethernet to Static, and fill IP address with the first IP in the DHCP range
  5. Then after setup complete, you can hold reset button while plug in the adapter. LED will show static Orange, then when the LED change to flashing Orange, you can release the reset button
  6. Now it's time to put LAN cable from laptop that already started with DHCP Server and TFTP server to LAN 1 (NOT WAN)
@rockavoldy
rockavoldy / 0-odoo-cheatsheet.md
Last active June 13, 2025 06:45
Odoo Cheatsheet
@rockavoldy
rockavoldy / flash-atmega328-using-raspi.md
Last active June 4, 2022 20:15
Flash atmega328p using Raspberry Pi

Flash atmega328p using Raspberry Pi

  1. Download avrdude, sudo apt install avrdude
  2. Copy avrdude.conf to home cp /etc/avrdude.conf ~/avrdude_gpio.conf
  3. Open avrdude_gpio.conf, and find linuxspi, then change baudrate to 115200
  4. Add below code to the bottom of that file
    # Linux GPIO configuration for avrdude.
    programmer
    

id = "pi_1";