This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # list the files and file sizes in current directory | |
| du -h --max-depth=1 | |
| # list the files and file sizes in a specific directory | |
| du -h --max-depth=1 /usr | |
| # swap space | |
| swapon -s | |
| # Listing all the partitions on the hard disk and their mount points by using the mount command. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: compile and rename to hello | |
| g++ hello.cpp -o hello | |
| g++ -Wall -std=c++14 hello.cpp -o hello | |
| :: execute the compiled code | |
| ./hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let secretMessage = ["Learning", "isn't", "about", "what", "you", "get", "easily", "the", "first", "time,", "it's", "about", "what", "you", "can", "figure", "out.", "-2015,", "Chris", "Pine,", "Learn", "JavaScript"]; | |
| secretMessage.pop(); | |
| secretMessage.push('to', 'program'); | |
| secretMessage[6] = 'right'; | |
| secretMessage.shift(); | |
| secretMessage.unshift('Programming'); | |
| secretMessage.splice(6, 4, 'know'); | |
| console.log(secretMessage.join(" ")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # list the updates | |
| Softwareupdate -l | |
| # Install a specific update by name, note the space after the hyphen is needed | |
| sudo softwareupdate -i "macOS Mojave 10.14.6 Supplemental Update 2- " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <link href='//fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'> | |
| <link rel="stylesheet" href="css/main.css"> | |
| <title>AJAX with JavaScript</title> | |
| <script> | |
| // create the http request object | |
| var xhr = new XMLHttpRequest(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| font-family: Helvetica, Arial, Sans-Serif | |
| text-decoration: underline; | |
| text-transform: uppercase; | |
| text-align: center, left, right; | |
| font-size: 60px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Link to={{ | |
| pathname: '/cources', | |
| search: '?sort=name', | |
| hash: '#the-hash', | |
| state: { fromDashboard: true } | |
| }}> | |
| Courses | |
| </Link> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Returns tr | |
| $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) | |
| $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| psExec \\\\WS886 cmd | |
| psExec \\WS886 cmd | |
| psExec '\\WS886' cmd | |
| https://community.spiceworks.com/how_to/78664-remove-local-printer-on-a-remote-machine |