Marek Hemmann - In Between

Alleine wegen des Tracks `Gemini` lohnt sich der Kauf dieses Albums schon sowas von..

Nachdem ich es (aufgrund dieses Tracks) heruntergeladen habe, merkte ich auch, dass sich noch mehr meiner last.fm loved tracks darunter befinden.

Kurzum Geilomat!

Selbst wenn man dann beim MP3-Download feststellt, dass aktuelle Linux-Versionen von Amazon nicht mehr unterstützt werden (man kann dann die Tracks einzeln herunterladen).

Von Daniel in music24.08.11 German (DE) E-Mail
Schlagworte: , ,


Script to double/halve OpenVZ resources

The following script allows you to easily double or halve resources in an OpenVZ container.

You would install this script as "/usr/local/bin/vz-double-resources" and also create a symlink named "vz-half-resources" to it (probably also in /u/l/b).

This then allows you to just call "vz-double-resources 123 shmpages" in case you've been notified that there have been shmpages beancounter failures (resource limit has been hit).
This outputs the command to double the bean counter limit, and allows for easy execution by just forwarding the output to "sh", as in "vz-double-resources 123 shmpages | sh -".

Here's the script (available and maintained as/at Gist):


# cat =vz-double-resources
if [ -z $VZ ] || [ -z $RESOURCE ]; then
    echo "Usage: $0 VZ RESOURCE"
    exit 1
case $0 in
  *-double-*) OPERATION="*2" ;;
  *-half-*)   OPERATION="/2" ;;
  *) echo "Invalid: $0" ; exit 1;;
echo "# Operation: $OPERATION"
# get failures:
# awk '$NF ~ /[0-9]*[1-9]$/' /proc/bc/*/resources
if [ -f /proc/bc/$VZ/resources ] ; then
# uid  resource                     held              maxheld              barrier                limit              failcnt
  resource=$(echo $RESOURCE | tr '[:upper:]' '[:lower:]')
  awk /$resource/ /proc/bc/$VZ/resources | {
    read resource held maxheld barrier limit failcnt
    if [ -n "$resource" ]; then
      cmd="vzctl set $VZ --$resource $(($barrier $OPERATION)):$(($limit $OPERATION)) --save"
      echo $cmd
[[ -n "$cmd" ]] && exit
if [ -f /etc/vz/conf/$VZ.conf ] ; then
  value=$(grep -i "^$RESOURCE=" /etc/vz/conf/$VZ.conf)
  eval $value
  RESOURCE=$(echo $RESOURCE | tr '[:lower:]' '[:upper:]')
  resource=$(echo $RESOURCE | tr '[:upper:]' '[:lower:]')
  value=$(eval echo \$${RESOURCE})
  echo $value | {
    IFS=: read barrier limit
    cmd="vzctl set $VZ --$resource $(($barrier $OPERATION)):$(($limit $OPERATION)) --save"
    echo $cmd
  echo "ERROR: container $VZ not found."
  exit 1

This is a script I've been using since quite a while (otherwise it would use zsh instead of bash), and have not looked into after creating it.
I just noticed that it is quite useful in general and therefore wanted to make it public.




Puppet definition to add Launchpad PPA repository

Link: https://gist.github.com/844735

The provided puppet definition(s) will allow you to add a PPA repository on a host managed by Puppet, e.g. by means of a class like this:


class blueyedppa {
  pparepo { "blueyed/ppa": apt_key => "7CC17CD2" }

I have created this to easily add the Current BOINC releases PPA to one of my hosts, and refactored a previously snippet for this.

Since I could not find anything for this, but questions asked about it, I like to share this. The actual code is available at the Gist linked to by this post.

By Daniel in Ubuntu, Audio2011-02-26 English (EU) Email


Planet Debian Space Wallpaper

Source: http://forums.debian.net/viewtopic.php?f=20&t=60172
Von Daniel in Fotos, Debian22.02.11 German (DE) E-Mail
Schlagworte: , , ,


The Field

You have to see the following in full screen
or wider

Over the Ice

A Paw in My Face

Von Daniel in music18.02.11 German (DE) E-Mail