Posts

Showing posts with the label map

Plan 9: Tiled Map

Image
  Use plot(1) to display tiled maps. The zoom factor decides the grid dimension. osm.js: Download tile images from OpenStreetMaps using hget. Cache the images. Convert the PNG image into Plan 9 format using png. Display the images using plot. Plot script   ra 0 0 200 200 m 0 100 im /file :Note - must end the script with a newline     Plot tries to center the drawing. Hence the origin is at the bottom with a slight offset from the left. However, image uses origin at the top left.     Interactive Plotting and Maps Use plot command in server mode (-s option). plot -s a.plt  mount /srv/plot /mnt/plot echo li 0 0 100 100 > /mnt/plot/ctl echo erase > /mnt/plot/ctl Usage as an interactive map.   OSM API Tiles https://tile.openstreetmap.org/zoom/x/y.png   The World map at zoom 0 https://tile.openstreetmap.org/0/0/0.png     Geocoding (Name to geographical co-ordinates) https://nominatim.openstreetmap.org/search?q=hebba...

Plan 9 : The Infinity Notebook

Image
  Plan 9 is an Operating System (OS) from Bell Labs which is a successor to UNIX. It builds on the learnings from the previous Operating systems. Network computing and graphics is an integral part of the OS rather than an afterthought. It is modular and portable - it comes with a cross compiler . It is available, under MIT License , which anybody can use, learn and tweak. Features Everything is a file. Small Kernel:  Around 5MB size which can be built in under 2 minutes.  Singular Grid: All the computers running Plan 9 OS and connected together act like a singular grid. So there's no need for remote access solutions like VNC or RDP. This cool video shows a small glimpse of the possibilities. Process Isolation: Processes run within their own namespaces and are isolated from each other. So you can run rio (the window manager) within rio. Applications like Browsers don't need complicated sandboxing. And a crashing program is unlikely to bring down the OS. No DLL Hell : ...

Context Menu is Personal (GNU Emacs)

Image
  Define custom menu based on your preferences. Note the definition of visibility conditions ( :visible keyword) and sub-menu ( More ). They are helpful in reducing the clutter. (Note: There are some placeholders in the code below.) (easy-menu-define my-menu global-map "My context menu"   '("Context Menu"     ["Cut"   kill-region :visible (region-active-p)]     ;; ["Copy"  kill-ring-save t] ;; Menu copies by default for further action     ["Paste" yank :visible (not (region-active-p))]     ["Open    " org-open-at-point t]     ["Calculate    " calc-grab-region t]     ["Execute    " (lambda () (interactive)             (shell-command-on-region (region-beginning) (region-end) "sh")) t]     ["Search Web" (lambda () (interactive) (eww (car kill-ring))) t]     ...