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

推荐订阅源

WordPress大学
WordPress大学
博客园 - 司徒正美
Last Week in AI
Last Week in AI
博客园 - 聂微东
Jina AI
Jina AI
月光博客
月光博客
爱范儿
爱范儿
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
T
Tailwind CSS Blog
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
罗磊的独立博客
小众软件
小众软件
雷峰网
雷峰网
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog

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.