From 7e0e116d4fc2a3d57e125770266e402f67ee815f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Sun, 14 Mar 2010 08:31:49 +0200 Subject: Converted bloop to Bash --- bloop.command | 28 +++++++++++++ blooper/Blooper.app/Contents/Info.plist | 44 --------------------- blooper/Blooper.app/Contents/MacOS/applet | Bin 55856 -> 0 bytes blooper/Blooper.app/Contents/PkgInfo | 1 - .../Contents/Resources/Scripts/main.scpt | Bin 6542 -> 0 bytes blooper/Blooper.app/Contents/Resources/applet.icns | Bin 40291 -> 0 bytes blooper/Blooper.app/Contents/Resources/applet.rsrc | Bin 725 -> 0 bytes .../Contents/Resources/description.rtfd/TXT.rtf | 9 ----- hellyeah.command | 30 -------------- hellyes.command | 30 ++++++++++++++ 10 files changed, 58 insertions(+), 84 deletions(-) create mode 100644 bloop.command delete mode 100644 blooper/Blooper.app/Contents/Info.plist delete mode 100755 blooper/Blooper.app/Contents/MacOS/applet delete mode 100644 blooper/Blooper.app/Contents/PkgInfo delete mode 100644 blooper/Blooper.app/Contents/Resources/Scripts/main.scpt delete mode 100644 blooper/Blooper.app/Contents/Resources/applet.icns delete mode 100644 blooper/Blooper.app/Contents/Resources/applet.rsrc delete mode 100644 blooper/Blooper.app/Contents/Resources/description.rtfd/TXT.rtf delete mode 100755 hellyeah.command create mode 100755 hellyes.command diff --git a/bloop.command b/bloop.command new file mode 100644 index 0000000..67b292a --- /dev/null +++ b/bloop.command @@ -0,0 +1,28 @@ +#! /usr/bin/env bash +# blooper.command +# Launch applications and reboot the machine +# @author Filipp Lepalaan +# @author Vesa Viskari +# @copyright (c) 2010 Filipp Lepalaan + +MYDIR="~/Desktop/BlooperApps" + +# Check if Login Item is set +defaults read com.apple.loginitems | grep -c "Path: $($0)" + +if [[ ! -d "$MYDIR" ]]; then + mkdir "$MYDIR" + ln -s /Applications/Utilities/Grapher.app "$MYDIR/Grapher.app" + ln -s /Applications/Utilities/Activity\ Monitor.app "$MYDIR/Activity Monitor.app" + ln -s /Applications/Utilities/Console.app "$MYDIR/Console.app" + ln -s /Applications/iTunes.app "$MYDIR/iTunes.app" +fi + +find "$MYDIR/" -exec open {} \; +trap "killall yes; rm ${MYDIR}; echo 'Cleaning up...'; exit 255" SIGINT +sleep 10 + +echo $(date) >> ~/Desktop/blooper.log + +#reboot +osascript -e 'tell application "Finder" to restart' diff --git a/blooper/Blooper.app/Contents/Info.plist b/blooper/Blooper.app/Contents/Info.plist deleted file mode 100644 index 82b055d..0000000 --- a/blooper/Blooper.app/Contents/Info.plist +++ /dev/null @@ -1,44 +0,0 @@ - - - - - CFBundleAllowMixedLocalizations - - CFBundleDevelopmentRegion - English - CFBundleExecutable - applet - CFBundleIconFile - applet - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Blooper2 - CFBundlePackageType - APPL - CFBundleSignature - aplt - LSMinimumSystemVersionByArchitecture - - x86_64 - 10.6 - - LSRequiresCarbon - - WindowState - - dividerCollapsed - - eventLogLevel - -1 - name - ScriptWindowState - positionOfDivider - 465 - savedFrame - 45 226 787 617 0 0 1440 878 - selectedTabView - result - - - diff --git a/blooper/Blooper.app/Contents/MacOS/applet b/blooper/Blooper.app/Contents/MacOS/applet deleted file mode 100755 index 5de1c60..0000000 Binary files a/blooper/Blooper.app/Contents/MacOS/applet and /dev/null differ diff --git a/blooper/Blooper.app/Contents/PkgInfo b/blooper/Blooper.app/Contents/PkgInfo deleted file mode 100644 index 3253614..0000000 --- a/blooper/Blooper.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPLaplt \ No newline at end of file diff --git a/blooper/Blooper.app/Contents/Resources/Scripts/main.scpt b/blooper/Blooper.app/Contents/Resources/Scripts/main.scpt deleted file mode 100644 index b61bc22..0000000 Binary files a/blooper/Blooper.app/Contents/Resources/Scripts/main.scpt and /dev/null differ diff --git a/blooper/Blooper.app/Contents/Resources/applet.icns b/blooper/Blooper.app/Contents/Resources/applet.icns deleted file mode 100644 index fcc1f09..0000000 Binary files a/blooper/Blooper.app/Contents/Resources/applet.icns and /dev/null differ diff --git a/blooper/Blooper.app/Contents/Resources/applet.rsrc b/blooper/Blooper.app/Contents/Resources/applet.rsrc deleted file mode 100644 index 8ee161e..0000000 Binary files a/blooper/Blooper.app/Contents/Resources/applet.rsrc and /dev/null differ diff --git a/blooper/Blooper.app/Contents/Resources/description.rtfd/TXT.rtf b/blooper/Blooper.app/Contents/Resources/description.rtfd/TXT.rtf deleted file mode 100644 index 547069e..0000000 --- a/blooper/Blooper.app/Contents/Resources/description.rtfd/TXT.rtf +++ /dev/null @@ -1,9 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf250 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\tx7280\tx7840\tx8400\tx8960\tx9520\tx10080\tx10640\tx11200\tx11760\tx12320\tx12880\tx13440\tx14000\tx14560\tx15120\tx15680\tx16240\tx16800\tx17360\tx17920\tx18480\tx19040\tx19600\tx20160\tx20720\tx21280\tx21840\tx22400\tx22960\tx23520\tx24080\tx24640\tx25200\tx25760\tx26320\tx26880\tx27440\tx28000\tx28560\tx29120\tx29680\tx30240\tx30800\tx31360\tx31920\tx32480\tx33040\tx33600\tx34160\tx34720\tx35280\tx35840\tx36400\tx36960\tx37520\tx38080\tx38640\tx39200\tx39760\tx40320\tx40880\tx41440\tx42000\tx42560\tx43120\tx43680\tx44240\tx44800\tx45360\tx45920\tx46480\tx47040\tx47600\tx48160\tx48720\tx49280\tx49840\tx50400\tx50960\tx51520\tx52080\tx52640\tx53200\tx53760\tx54320\tx54880\tx55440\tx56000\ql\qnatural\pardirnatural - -\f0\fs24 \cf0 K\'e4ynnist\'e4\'e4 maxApps - m\'e4\'e4r\'e4n ohjelmia joko Applications tai ty\'f6p\'f6yd\'e4n "TestiOhjelmat" kansiosta.\CocoaLigature0 \ -\CocoaLigature1 Loggaa onnistuneet luupit logFile - tiedostoon ty\'f6p\'f6yd\'e4lle\CocoaLigature0 \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural -\cf0 \CocoaLigature1 Odottaa waitFor - sekunttia ja k\'e4ynnist\'e4\'e4 koneen uudestaan} \ No newline at end of file diff --git a/hellyeah.command b/hellyeah.command deleted file mode 100755 index 1d9b339..0000000 --- a/hellyeah.command +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# hellyeah.command -# Do some stress testings -# @author Filipp Lepalaan - -MYDIR=/private/tmp/_hellyeah -CORES=$(sysctl hw.logicalcpu_max | cut -d : -f 2 | sed 's/ //') - -for (( i = 0; i < ${CORES}; i++ )); do - yes > /dev/null 2>&1 & -done - -if [[ ! -d "${MYDIR}" ]]; then - mkdir "${MYDIR}" -fi - -trap "killall yes; rm ${MYDIR}; echo Killed; exit 255" SIGINT SIGTERM - -while true; do - for k in 10 100 1000 10000; do - BLOCKS=$(($k*1024/512)) - OF="${MYDIR}/$(uuidgen)" - dd if=/dev/random of=${OF} count=${BLOCKS} > /dev/null 2>&1 - sleep 2 - echo "Wrote ${BLOCKS} blocks" - rm -rf "${OF}" - done -done - -exit 0 diff --git a/hellyes.command b/hellyes.command new file mode 100755 index 0000000..cd857a0 --- /dev/null +++ b/hellyes.command @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# hellyeah.command +# Do some stress testing +# @author Filipp Lepalaan + +MYDIR=/private/tmp/_hellyeah +CORES=$(sysctl hw.logicalcpu_max | cut -d : -f 2 | sed 's/ //') + +for (( i = 0; i < ${CORES}; i++ )); do + yes > /dev/null 2>&1 & +done + +if [[ ! -d "${MYDIR}" ]]; then + mkdir "${MYDIR}" +fi + +trap "killall yes; rm ${MYDIR}; echo 'Cleaning up...'; exit 255" SIGINT SIGTERM + +while true; do + for k in 10 100 1000 10000; do + BLOCKS=$(($k*1024/512)) + OF="${MYDIR}/$(uuidgen)" + dd if=/dev/random of=${OF} count=${BLOCKS} > /dev/null 2>&1 + sleep 2 + echo "Wrote ${BLOCKS} blocks" + rm -rf "${OF}" + done +done + +exit 0 -- cgit v1.2.3