惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
S
SegmentFault 最新的问题
WordPress大学
WordPress大学
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
MyScale Blog
MyScale Blog
A
About on SuperTechFans
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
The Cloudflare Blog
F
Fortinet All Blogs
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
罗磊的独立博客
量子位
有赞技术团队
有赞技术团队
V
V2EX
Engineering at Meta
Engineering at Meta

Stonecharioteer on Tech

I Traced My Traffic Through a Home Tailscale Exit Node What Was I Reading Last? In Three Not-So-Easy Pieces Dogfooding Is Hard Code blocks in your books, finally GoForGo v0.9.0 Merrilin - We built an app to read books I use a Macbook now Data Structures & Algorithms - Preparing for Interviews Using a local DNS namespace for local service discovery Direction KOllector - Publishing KOReader Highlights gbt: branches touched in the last 24 hours A Soiree into Symbols in Ruby Some Smalltalk about Ruby Loops Ruby Blocks Returning from Ruby Blocks, Procs and Lambdas My Linux Laptop Finally Works: How Claude Helped Me Fix Years of Annoyances TIL: Watchexec - Modern File Watching for Development Workflows A Less Busy Mind GoForGo - Learn Go through live examples Migrating My Old Blog to Hugo with Claude The Qtile Window Manager: A Python-Powered Tiling Experience Read the RFCs that Built the Internet Py-x-Protobuf - Or How I Learned to Stop Worrying and Love Protocol Buffers Python Reverse a List New Beginnings Leaving ChainSafe Systems Screen Lock for Cinnamon Desktop using Zenity and Terminal Commands Crews Not Teams A System for Getting Better at LeetCode
TIL: Fantasy Map Generation and Disabling Laptop Internal...
2020-12-06 · via Stonecharioteer on Tech

Today’s learning covered creative computational techniques and practical system administration solutions.

Algorithmic Fantasy Map Generation

Generating fantasy maps explores sophisticated algorithms for creating realistic fantasy world maps programmatically.

Core Techniques:

Terrain Generation:

  • Heightmap generation: Using noise functions (Perlin, simplex) to create realistic elevation
  • Erosion simulation: Hydraulic and thermal erosion for natural-looking landscapes
  • Climate modeling: Temperature and precipitation based on latitude, elevation, and proximity to water
  • Biome placement: Logical distribution of forests, deserts, grasslands based on climate

Procedural Details:

  • River networks: Flow accumulation algorithms to create realistic river systems
  • Coastline generation: Fractal techniques for natural-looking shorelines
  • Mountain ranges: Plate tectonics simulation for believable geological features
  • Vegetation patterns: Ecological modeling for forest distribution

Applications:

  • Game development: Procedurally generated worlds for RPGs and strategy games
  • Worldbuilding: Tools for authors and tabletop RPG creators
  • Educational tools: Understanding geography and climate systems
  • Artistic projects: Generating maps for fictional stories and campaigns

Technical Implementation:

The algorithms combine mathematical models with artistic principles to create maps that feel both realistic and fantastical, suitable for fictional worlds while maintaining geographical plausibility.

Ubuntu solution for disabling laptop’s internal keyboard provides multiple approaches for temporarily or permanently disabling the built-in keyboard.

Method 1: xinput (Temporary)

1
2
3
4
5
6
7
8
# List input devices to find keyboard ID
xinput list

# Disable the internal keyboard (replace XX with actual ID)
xinput float XX

# Re-enable when needed
xinput reattach XX 3

Method 2: Blacklisting Kernel Module (Permanent)

1
2
3
4
5
6
7
8
# Find the keyboard module
lsmod | grep keyboard

# Create blacklist file
sudo echo "blacklist atkbd" >> /etc/modprobe.d/blacklist-keyboard.conf

# Update initramfs and reboot
sudo update-initramfs -u

Method 3: udev Rules (Selective)

1
2
3
4
5
# Create udev rule to ignore specific keyboard
sudo nano /etc/udev/rules.d/99-disable-internal-keyboard.rules

# Add rule content:
# SUBSYSTEM=="input", ATTRS{name}=="AT Translated Set 2 keyboard", ENV{DEVNAME}=="*event*", RUN+="/bin/sh -c 'echo remove > %S%p/uevent'"

Use Cases:

  • External keyboard preference: Using mechanical or ergonomic keyboards exclusively
  • Cleaning and maintenance: Preventing accidental input during laptop cleaning
  • Damaged keyboards: Temporary solution while awaiting repair
  • Kiosk deployments: Preventing unauthorized input in public terminals

These methods provide flexibility for different scenarios, from temporary disabling for maintenance to permanent solutions for dedicated workstation setups.