编程知识 cdmana.com

How does MAC make computer screen snow at Christmas?

For Apple Mac On the computer “ terminal ” application , Maybe we don't use it very much , So it should be strange to it . In fact, this terminal application is used to let the user input some system instructions directly , Let it do the corresponding operation , For example, simply display the files in the current directory , Show date and time , Delete files and other operations are OK . Christmas is coming this year , Today, I'm here to introduce you how to use Mac On the terminal window of , By inputting specific instructions to achieve the effect of snow , My favorite little friend, come and operate it !

1. First of all, please go to Mac In the system , open Launchpad Interface , As shown in the figure :

2. Next find Mac In the system 【 terminal 】 application , Click on the open .

 

3. After turning on the terminal , Next, click it at Mac In the menu at the top of the screen Shell menu , As shown in the figure

4. Later on Shell The menu , Please click 【 New window -Ocean】 To create a new terminal window with a blue background , This can make the snow effect more beautiful after .

5. Then enter the following code in the terminal window , It can be directly copied and pasted into the terminal window , You can press enter at the end :

ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S=["2743".to_i(16)].pack("U*");a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.1}'  

After execution , You can see the snowflakes falling from the top of the terminal , It's very nice .

6、 After watching the snow in the terminal window , If you want to exit the terminal , Please press straight Command+Q Combination button , Click again 【 close 】 That's all right. .

That's what I'm going to share with you today , I hope it will be of some help to you .

版权声明
本文为[Mac xiaomuzi plum]所创,转载请带上原文链接,感谢

Scroll to Top