Limit CPU-Usage of a PID, User, or "Program"
Background
The cpulimit package for my distribution is outdated and does not support multi-core CPUs. I thus wrote a crude replacement in bash. The little program comes with a help text, which is displayed when called without arguments.
The Script cpulimit.sh
#! /bin/bash
# last modified: March 2012

# This is a variation of the bash-script found at
# http://hints.macworld.com/article.php?story=20110131001708255

# check number of arguments given
no_of_expected_args=2
if [ $# -ne $no_of_expected_args ]; then
    printf "
    Error: Invalid arguments.

    Usage: 

        ./cpulimit.sh <PID> <Percentage of time to run>
        ./cpulimit.sh <user-name> <Percentage of time to run>
        ./cpulimit.sh <process-name> <Percentage of time to run>

    Examples:

        ./cpulimit.sh 12345 75  # The process with PID 12345 is paused and
                                # resumed, such that (on average) it runs 75%%
                                # of the time. CPU-usage is thereby reduced
                                # to 75%% of the processes' usual usage.

        ./cpulimit.sh bob 50    # All processes of user 'bob' are paused and
                                # resumed, such that (on average) they run 50%%
                                # of the time.

        ./cpulimit.sh xeyes 25  # All processes named 'xeyes' are paused and
                                # resumed, such that (on average) they run 25%%
                                # of the time.
                               
    Description:

        To decrease the CPU demands of an application, the corresponding
        process is paused and resumed alternatingly.

    Hints: + Get PID with  'ps -u <username>'  or  'pgrep <application name>'
           + Limit processes of other users with   'sudo ./cpulimit ...'  
           + Be careful when limiting yourself (your user)
               
"
    exit -1
fi
var=$1 # can be PID, user-id, process-name
run_perc=$2

# calculate absolute run- and sleep-time
sleep_perc=$[100-$run_perc]
granularity=0.5 # in seconds
runtime=$(echo "scale=4; $granularity*$run_perc/100" | bc)
sleeptime=$(echo "scale=4; $granularity*$sleep_perc/100" | bc)

# determine if argument is a number, i.e. PID
if [ $var -eq $var 2> /dev/null ]; then
    var_is="PID"
else
  # determine if argument was user-name or process-name
  id "$var" &> /dev/null
  if [ $? -eq 0 ]; then  # argument is user-name
    var_is="user"
  else
    var_is="process(es)"
  fi
fi

# status output
printf "starting $0 for $var_is $var - %s\n" "$(date)"
echo ">>> press <space> to terminate cpulimit.sh <<<"

while true; do                      # repeat until <space> pressed

  read -d " " -s -t $runtime        # read keyboard input while process running
  if [ "$?" == 0 ]; then break; fi  # exit loop, if space was pressed
 
  case "$var_is" in
    "PID")
      kill -SIGSTOP $var            # pause process excution
      ;;
    "user")
      killall -SIGSTOP -u $var      # pause execution of user's processes
      ;;
    "process(es)")
      killall -SIGSTOP "$var"       # pause processes   
      ;;
  esac
 
  read -d " " -s -t $sleeptime      # read keyboard input while process paused
  if [ "$?" == 0 ]; then break; fi  # exit loop, if space was pressed

  case "$var_is" in
    "PID")
      kill -SIGCONT $var            # resume process excution
      ;;
    "user")
      killall -SIGCONT -u $var      # resume execution of user's processes
      ;;
    "process(es)")
      killall -SIGCONT "$var"       # resume processes
      ;;
  esac

  printf "\r$0 active for $var_is $var - %s" "$(date)"    # status output

done # end while

# resume execution (in case they are currently paused)
case "$var_is" in
  "PID")
    kill -SIGCONT $var              # resume process excution
    ;;
  "user")
    killall -SIGCONT -u $var        # resume execution of user's processes
    ;;
  "process(es)")
    killall -SIGCONT "$var"         # resume processes
    ;;
esac

printf "\rstopping $0 for $var_is $var - %s\n" "$(date)"        # status output