OSX/IOS

Deja que nieve en tu Mac OS X con este comando

Haz que nieve en la terminal con un comando

Es la temporada de diversión invernal y magia navideña … ¡en su terminal Mac OS X con algunas nevadas digitales!

Esta línea de comando ruby ​​no tan pequeña hará que nieve en la línea de comando de su computadora Mac, no hay muchas cosas que nevar más allá de simplemente copiar y pegar, pero para obtener mejores resultados, asegúrese de usar un blanco- Tema terminal en negro, como «Peppermint», «IR Black», «Pro» o «Classic» para obtener copos de nieve blancos, de lo contrario terminarás con algunos copos de nieve funky que no son exactamente festivos …

Cómo hacer nieve terminal

¿Listo para la nieve? Esto es lo que quiere hacer:

  1. Inicie la aplicación Terminal, que se encuentra en el directorio / Aplicaciones / Utilidades /
  2. Configure la ventana de Terminal activa en un tema en blanco y negro presionando Comando + i en la ventana de Terminal para cambiar instantáneamente la configuración visual usando el panel Inspector
  3. Copie y pegue el siguiente símbolo del sistema:
  4. rubin -e 'C = `stty size`.scan (/ d + /)[1].to_i; S =["2743".to_i(16)].pack ("U *"); a = {}; pune " 033[2J";loop{a[rand(C)]= 0; a. Cada {| x, o |; de[x]+ = 1; imprimir " 033[#{o};#{x}H 33[#{a[x]}; # {x} H # {S} 033[0;0H"};$stdout.flush;sleep 0.1}'

  5. Hit the Return key to start the snow fall

Make sure the the entire command string is all on a single line, it should look something like this when pasted at the prompt before hitting enter to start running:

The snow command

Once you hit return you’ll immediately see the snowflakes falling, it’s better represented by the animation up top but this screen shot gives a static example. The snowflakes will continuously fall, and accumulate on a single line at the very bottom of the terminal window:

Snow in the command line


You can stop the fancy ruby snow machine by hitting Control+Z to suspend the process.

For the best wintery results, crank up the font size of the terminal window a by by hitting Command+ a few times, size 18 or larger is best to show off the snowflake details. Leaving your desk? Throw the Terminal window into Full Screen App Mode, and then execute the snow machine command for a nice little screen saver.

The command consumes about 4% to 10% CPU to run indefinitely in the background, which isn’t too aggressive but it’s enough that you probably won’t want to be running this process if you’re busy trying to conserve battery life or dedicate all your processing power to rendering something important.

¿Te da frío solo viendo caer la nieve virtual? Bueno, es la época adecuada del año para tirar la clásica aplicación de chimenea de 8 bits y calentar con algunas llamas virtuales pixeladas. Tu Mac nunca ha sido tan festiva, ¿verdad?

¿Bah farsa? ¿No estás interesado en todas las vacaciones? ¿Quizás odias la nieve con pasión? Está bien, porque puedes usar The Matrix para la línea de comandos, que se ve bastante elegante y mucho menos estacional.

Este ingenioso truco se encontró en Comentarios CLIMagic, y para los usuarios de línea de comandos que no están ejecutando Mac OS X, encontrará otra solución que también funciona para Linux (el otro comando también funciona en Mac, pero requiere que gawk esté preinstalado a través de Homebrew o compile con gcc).

Publicaciones relacionadas

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Botón volver arriba
Cerrar