Skip to content

Instantly share code, notes, and snippets.

View lll9p's full-sized avatar

Lilin Lao lll9p

View GitHub Profile
### Keybase proof
I hereby claim:
* I am lll9p on github.
* I am lll9p (https://keybase.io/lll9p) on keybase.
* I have a public key ASA6LTpKDZPBytODoiMJX3o-I2UUVYXrrgBq-9UqaEp2hgo
To claim this, I am signing this object:
#
# Automatically generated file; DO NOT EDIT.
# OpenWrt Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
# CONFIG_TARGET_sunxi is not set
# CONFIG_TARGET_apm821xx is not set
# CONFIG_TARGET_ath25 is not set
# CONFIG_TARGET_ar71xx is not set
@lll9p
lll9p / Read-only FS on Arch Linux ARM.md
Created February 20, 2020 12:18 — forked from yeokm1/Read-only FS on Arch Linux ARM.md
Set up Arch Linux ARM on Raspberry Pi to boot from and use a read-only file-system

Read-only FS on Arch Linux ARM

Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.

Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.

Login with default username: alarm, password: alarm

#Optionally enable root over SSH. The rest of these instructions assume u are in root.
@lll9p
lll9p / ENCIDFILE.txt
Created April 28, 2021 01:18
ENCIDFILE
U2FsdGVkX1/62ZxhaU11gpfRb8JPhap66xLDxbiJM42ZtWIVZoWC0edq4auuvA605ZLJCS1OuADi
QuqWQ40vzdQNviGtymbsb1FCdYg84XDSn9JpJ+kTplCGB1R+Pe6on4OPMtBTfVL6iQUin7a0w+UG
ohlx/mmyAnPEXoTL1tp01c9UQqzoFoq6egSE0G7ycLbz4N+xTAbk1qmia41j80OUY/nmSOOvOPL/
+hravoHOktDem03f54L27ZD+UAeopgLAhkd43i3rg3x8qHLaL16N2VIKaVVvF+3a+5p+kPtHZl/m
zvxNM++86nSanl2M3Im2av2T9Xwfu3VMu1vCwFqc3egncHc0DQWF+WYpcLtg6yfoR4zFtLkzCviT
ijlW7YQx+pdptHhTvw4a69VwH2TYO1qWQX48SM/cy82X50fxc0W9k8WoV3N2qvPRgzlmXaR1tkp8
MeVfyrYrEvuxEKhyNM3Vy7eMkGJKHRs4uW4ZH/rCPKqQ0cmmWV8Q+ctCzcW83kWRl+y7N0EKeude
g/ic5fA5QcRYy3xgdnGqHQlRQt24Aqu0s6z+GGJlePgGh6J9XTsJqbjp72W9bfk0hzbQTOz0S+4+
/F5X5/93VHHbeItHTK43cicGZEGJE9HxORr104rK0V76/h/oYksV+gE6uLaJHYMBY3zOt1eAV6Dj
bJM6lsz3vSH+gdwHItyD3W8YNwrEnUQbLa+nsnkdL2DjjpxlCR+4w+LzQTxPlDdILlJjDOmMCtP6
@lll9p
lll9p / create_widgets.rs
Last active December 14, 2022 16:57
Custom widget
pub fn create_widgets_on_window(app: &Application) -> ApplicationWindow {
let container = gtk::Box::new(gtk::Orientation::Vertical, 5);
let shape_widget = shape::Shape::new(); // create custom shape widget.
let class = 0;
let mut shape_data = shapes::Shape::new_polygon(class);
shape_widget.init_shape(shapes::Shape::new_polygon(class));
use shapes::Point;
let path = [
Point::new(209., 393., class),
Point::new(339., 207., class),