I use stress for this kind of thing, you can tell it how many cores to max out.. it allows for stressing memory and disk as well.
Example to stress 2 cores for 60 seconds
stress --cpu 2 --timeout 60
This file contains 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
FROM python:3.7 | |
# Set the timezone to KST | |
RUN cat /usr/share/zoneinfo/Asia/Seoul > /etc/localtime | |
RUN set -ex \ | |
&& apt-get clean && apt-get update \ | |
&& apt-get install --no-install-recommends -y groff \ | |
&& rm -rf /var/lib/apt/lists/* |
This file contains 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
# Alert when the rate of events exceeds a threshold | |
# (Required) | |
# Rule name, must be unique | |
name: OutOfMemoryError | |
# (Required) | |
# Type of alert. | |
# the frequency rule type alerts when num_events events occur with timeframe time | |
type: frequency |
This file contains 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/env bash -x | |
hdiutil attach "/Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg" -noverify -nobrowse -mountpoint /Volumes/install_app | |
exitStatus=$? | |
if [ $exitStatus -ne 0 ]; then | |
exit $exitStatus | |
fi | |
# Convert the boot image to a sparse bundle | |
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o "/tmp/El Capitan" |
This file contains 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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: ngrinder-agent | |
spec: | |
replicas: 5 | |
template: | |
metadata: | |
labels: | |
app: ngrinder-agent |
This file contains 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/env bash -x | |
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
exitStatus=$? | |
if [ $exitStatus -ne 0 ]; then | |
exit $exitStatus | |
fi | |
# Convert the boot image to a sparse bundle | |
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Mavericks |
This file contains 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
#!/bin/bash -e | |
TODAY=$(date '+%Y-%m-%d') | |
DOWNLOAD_DIR="${HOME}/Downloads/${TODAY}" | |
mkdir -p "${DOWNLOAD_DIR}" | |
type qpdf &>/dev/null || brew install qpdf | |
type recode &>/dev/null || brew install recode | |
curl -H 'Accept-Charset: euc-kr' --silent "http://consensus.hankyung.com/apps.analysis/analysis.list?&pagenum=800" | iconv -f euc-kr -t utf-8 | grep report_idx | while IFS= read -r LINE; do |
This file contains 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
#!/bin/bash | |
type csvsql || brew instal csvkit | |
type jq || brew install jq | |
type aws || brew intall awscli | |
TABLE_NAME=tmp | |
TMP_FILE=${TABLE_NAME}.csv | |
OUTPUT_FILE="output.csv" | |
truncate -s 0 "${OUTPUT_FILE}" |
This file contains 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
#!/bin/bash -ex | |
if (! which sshd) ; then | |
sudo apt-get update -y | |
sudo apt-get install -y openssh-server | |
sudo mkdir /run/sshd | |
sudo /usr/sbin/sshd -d & | |
fi | |
if [[ -z "$NGROK_TOKEN" ]]; then |
NewerOlder