- Connect fiber modem on ether1
- Add VLAN on ether1 with id 10 (vlan-edpnet)
- Add PPPoE client on vlan-edpnet, user: xxx@EDPNET
- Add NAT: out interface = vlan-edpnet, action = masquerade
- /system package enable ipv6
# Reset "don't show this notification again" on NetworkManager notifications | |
dconf reset /org/gnome/nm-applet/disable-connected-notifications |
# frozen_string_literal: true | |
class LRUCache | |
attr_reader :capacity, :cache | |
def initialize(capacity) | |
@capacity = capacity | |
@cache = {} | |
end |
#!/usr/bin/env ruby | |
# | |
# yaml-keysort.rb - Sort YAML files by key while keeping comments intact | |
# | |
# Note: script does not parse YAML and copies lines entirely, only keeping track of top-level keys. | |
# Ensure there is a blank line between each block. | |
# frozen_string_literal: true | |
file = ARGV.pop |
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# | |
# This script automatically resolves merge conflicts in the schema migrations | |
# part of structure.sql. It sorts, deduplicates and reformats all migration | |
# entries in the file. | |
# | |
# Example: | |
# |
Follow this guide if you want to install Windows over PXE using Arch Linux as a PXE server.
Ensure the PXE target is booting in UEFI mode (without CSM support). Set PCI LAN as first and only boot device, and disable UEFI IPv6 Network Stack (we'll boot over IPv4).
pacman -S dnsmasq wimlib darkhttpd samba
#!/usr/bin/env ruby | |
NODES = [] | |
`grep -r "from 'modules/" app/modules`.split(%r{$}).map(&:strip).each do |line| | |
next if line.empty? | |
split = line.split ':' | |
source = split.first.match(%r{^app/modules/([^/]*)})&.captures&.first |
# frozen_string_literal: true | |
class ApplicationController < ActionController::API | |
after_action :allow_iframe | |
protected | |
def allow_iframe | |
response.headers['X-Frame-Options'] = 'ALLOW-FROM localhost:3000' | |
end | |
end |
# frozen_string_literal: true | |
class Handler | |
attr_accessor :next_handler | |
def initialize(next_handler = nil) | |
@next_handler = next_handler | |
end | |
def handle(package) |
#!/bin/sh | |
if [[ "$1" == "stop" ]]; then | |
sudo systemctl stop nvidia-persistenced bumblebeed | |
sudo rmmod nvidia_modeset nvidia | |
echo OFF | sudo tee /proc/acpi/bbswitch | |
cat /proc/acpi/bbswitch | |
xrandr --output VIRTUAL3 --off --output VIRTUAL2 --off --output VIRTUAL1 --off --output VIRTUAL7 --off --output VIRTUAL6 --off --output VIRTUAL5 --off --output VIRTUAL4 --off --output VIRTUAL9 --off --output VIRTUAL8 --off --output LVDS1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off | |
else | |
sudo systemctl start nvidia-persistenced bumblebeed |