Skip to content

Instantly share code, notes, and snippets.

View llity's full-sized avatar
🍉
I may be slow to respond.

Hanial Li llity

🍉
I may be slow to respond.
View GitHub Profile
@llity
llity / auto-artifact-export.yml
Created March 18, 2024 07:30 — forked from piyoki/auto-artifact-export.yml
mosdns-v5 config template
---
- name: Update dat files
hosts: all
become: yes
vars:
- base_path: /etc/mosdns
- restart_daemon: yes
- daemon_service_name: mosdns
- clean_up_after: yes
/interface/veth/add address=172.21.0.201/24 gateway=172.21.0.254 name=veth201
/interface/bridge/port/add bridge=dockers interface=veth201
/container/envs/add name=adguard_envs key=TZ value="Asia/Jerusalem"
/container/config/set registry-url=https://registry-1.docker.io tmpdir=usb1-part1/pull
/container/mounts/add dst=/opt/adguardhome/conf name=adguardhome_conf src=usb1-part1/adguardhome/conf
/container/mounts/add dst=/opt/adguardhome/work name=adguardhome_work src=usb1-part1/adguardhome/work
/container/add remote-image=adguard/adguardhome:latest interface=veth201 logging=yes mounts=adguardhome_conf,adguardhome_work root-dir=usb1-part1/adguardhome/root envlist=adguard_envs start-on-boot=yes
@llity
llity / mikrotik_container_adguardhome.txt
Created March 11, 2024 08:30 — forked from kangarie/mikrotik_container_adguardhome.txt
mikrotik container adguard home script installation
/system/device-mode/update container=yes
/interface veth add address=172.17.0.1/24 gateway=172.17.0.254 name=agh
/interface bridge add name=dockers
/interface bridge port add bridge=dockers interface=agh
/ip address add address=172.17.0.254/24 interface=dockers network=172.17.0.0
/ip firewall nat add action=masquerade chain=srcnat
/container config set registry-url=https://registry-1.docker.io tmpdir=/disk1/tmp
@llity
llity / configuration.nix
Created January 28, 2024 02:42 — forked from rickhull/configuration.nix
Prometheus, Grafana, Loki, Promtail on NixOS
# MONITORING: services run on loopback interface
# nginx reverse proxy exposes services to network
# - grafana:3010
# - prometheus:3020
# - loki:3030
# - promtail:3031
# prometheus: port 3020 (8020)
#
services.prometheus = {
@llity
llity / karabiner.json
Last active February 23, 2020 12:33
karabiner.json→.edn
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
@llity
llity / karabiner_capslock_control_tab.json
Created February 16, 2020 02:48 — forked from gxfxyz/karabiner_capslock_control_tab.json
Karabiner-Elements config: CapsLock / Control / Tab
{
"title": "CapsLock / Control / Tab",
"rules": [
{
"description": "Tap CapsLock (⇪) → Escape (⎋); Hold CapsLock (⇪) → Control (⌃)",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
@llity
llity / karabiner_switch_input_source.json
Created February 16, 2020 02:47 — forked from gxfxyz/karabiner_switch_input_source.json
Karabiner-Elements config: switch input source | 输入法切换
{
"title": "Switch input source | 输入法切换",
"rules": [
{
"description": "Tap Command_L (⌘) → Switch input source to English | 短按左 Command (⌘) → 切换到英文输入法",
"manipulators": [
{
"conditions": [
{
"input_sources": [