Skip to content

Instantly share code, notes, and snippets.

@PowerSchill-xx
PowerSchill-xx / Bash: Install TMUX
Last active July 9, 2020 04:17
Bash: Install TMUX
# 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'
@PowerSchill-xx
PowerSchill-xx / gist:5027172
Created February 25, 2013 03:01
PowerShell: Get-SystemUptime
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