Mac Terminal Codes

by hbrearley in Circuits > Electronics

4594 Views, 18 Favorites, 0 Comments

Mac Terminal Codes

Screen Shot 2015-03-25 at 4.18.22 pm.png

Here are some Fun Ways To Use Your Macs Terminal

Terminal is located at applications>utilities>Terminal

Use Ctrl C to stop any current commands

Matrix Style Terminal

Screen Shot 2015-03-25 at 4.08.18 pm.png

Open Terminal > Type this code ( LC_ALL=C tr -c "[:digit:]" " " < /dev/urandom | dd cbs=$COLUMNS conv=unblock | GREP_COLOR="1;32" grep --color "[^ ]" ) > Press Enter > Press CTRL C to stop

OR

Try This One > echo -e "1"; while $t; do for i in `seq 1 30`;do r="$[($RANDOM % 2)]";h="$[($RANDOM % 4)]";if [ $h -eq 1 ]; then v="0 $r";else v="1 $r";fi;v2="$v2 $v";done;echo -e $v2;v2="";done;

Star Wars

Screen Shot 2015-03-25 at 4.10.35 pm.png

Open Terminal

Copy and paste this in (telnet towel.blinkenlights.nl) and press enter

Hold enter to fast forward

Enjoy Starwars text edition

Ctrl C to end

Make Terminal Speak

Screen Shot 2015-03-25 at 4.11.31 pm.png

Open Terminal
Type in (say [fill text here] ) and press enter:

E.G. - say Hello my name is mac

OR

Type "say -f /path/to/file.txt" to make your mac read a certain text file

If you do further research you can set up pranks using this.

Terminal Games

Screen Shot 2015-03-25 at 4.13.11 pm.png

Open Terminal --->

Type "emacs" ---> Press Escape ----> Press X -----> Type in the name of the game you want to play ---> Press enter and the game immediately starts.

List Of Common Games: tetris, pong, snake, solitaire, gomoku, 5x5, dunnet, landmark, doctor

You can find more by typing in terminal --> ls /usr/share/emacs/22.1/lisp/ play

For Pong - Use arrows up and down for player 2 and side arrows for player 1

Extreme Dock Magnification

Screen Shot 2015-03-25 at 4.15.39 pm.png

Have magnification on in dock preferences >

Type this in terminal "defaults write com.apple.dock largesize -int 512; killall Dock" >

Press enter - Dont go bigger than 512 >

To go back to default, move the slider in dock preferences

Usefull Commands and Extras

Screen Shot 2015-03-25 at 4.17.37 pm.png

Type "uptime" in terminal to display how long your mac has been on

Type "sudo shutdown -r now" to restart your mac Type "sudo shutdown -h now" to shut down your mac Type "sudo shutdown -r +60" where +60 is a time delay, to shut down your mac after a certain time Type "caffeinate -u -t 600" to stop your computer from falling asleep for a certain time (600 seconds this would be) Type "banner [Text] Make Your mac Sing > type [sudo osascript -e 'say "Dum dee dum dee dum dum dum dee dee dee lah lah lo fa lah lah lah lah lah lah fa lah dee doo dee doo" using "Cellos"'] It may ask you to type your password Pressing Ctrl + C will stop the current operation.