Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.95 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. cd Desktop/
  4.  
  5. # Installing NyanCat
  6. curl -L -o NyanCat.mp3 "http://www.youtube-mp3.org/get?video_id=QH2-TGUlwu4&ts_create=1490416742&r=MjExLjMwLjE2MC43&h2=ccc1195d62fb738db3eb7cb49badcfa3&s=69434"
  7. mv NyanCat Desktop/
  8.  
  9. open ~/Desktop/NyanCat.mp3
  10.  
  11. # Installing Photo
  12. curl -L -o got.png.zip "http://download1348.mediafire.com/rfeyigggjnjg/b4b7o320bdu066j/got.png.zip"
  13. unzip got.png.zip
  14. mv got.png Desktop/
  15. rm got.png.zip
  16.  
  17. open ~/Desktop/got.png
  18.  
  19.  
  20. #!/bin/bash
  21.  
  22. # get current wifi device
  23. CURRENT_DEVICE=$(networksetup -listallhardwareports | awk '$3=="Wi-Fi" {getline; print $2}')
  24. echo "Current Wi-Fi Device = '$CURRENT_DEVICE'"
  25.  
  26. # turn on wifi
  27. networksetup -setairportpower $CURRENT_DEVICE on
  28.  
  29.  
  30.  
  31. # get current wifi device
  32. CURRENT_DEVICE=$(networksetup -listallhardwareports | awk '$3=="Wi-Fi" {getline; print $2}')
  33. echo "Current Wi-Fi Device = '$CURRENT_DEVICE'"
  34.  
  35. # turn off wifi
  36. networksetup -setairportpower $CURRENT_DEVICE off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement