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
| # Yum package installation | |
| ## Install development patches | |
| sudo yum install gcc kernel-devel make ncurses-devel -y | |
| mkdir -p ~/tmp/ | |
| ## Download sources | |
| wget -O ~/tmp/libevent.tar.gz 'https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz' | |
| wget -O ~/tmp/tmux.tar.gz 'http://sourceforge.net/projects/tmux/files/latest/download?source=files' |
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
| function Get-SystemUptime ($computer = "$env:computername") { | |
| $lastboot = [System.Management.ManagementDateTimeconverter]::ToDateTime("$((gwmi Win32_OperatingSystem -computername $computer).LastBootUpTime)") | |
| $uptime = (Get-Date) - $lastboot | |
| Write-Host "System Uptime for $computer is: " -NoNewline -ForegroundColor $ValueColor2 | |
| Write-Host $uptime.days -NoNewline -ForegroundColor $LabelColor | |
| Write-Host " days " -NoNewline -ForegroundColor $ValueColor2 | |
| Write-Host $uptime.hours -NoNewline -ForegroundColor $LabelColor | |
| Write-Host " hours " -NoNewline -ForegroundColor $ValueColor2 | |
| Write-Host $uptime.minutes -NoNewline -ForegroundColor $LabelColor | |
| Write-Host " minutes " -NoNewline -ForegroundColor $ValueColor2 |