Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
# mr presidend - coco jumbo (8 beats) | |
# http://latwenuty.blogspot.com/2012/07/mr-president-coco-jambo.html | |
# you can listen below track on soundcloud: | |
# https://soundcloud.com/hopbit/mr-president-coco-jumbo-fdm-spi-short-rmx | |
use_bpm 129 | |
notes = [:gs4,:cs5,:gs5,:g4,:cs5] # 1 tact | |
notes += [nil,:gs5,:e5,:ds5,:cs5] | |
notes += [:a4,:cs5,:e5,:b4,:ds5] # 2 tact | |
notes += [nil,:fs5,:e5,:ds5,:cs5] | |
#otes += [:d5, :ds5, nil, nil, nil, nil, nil, nil] |
# :saws live loop written by @pjagielski, | |
# but I couldn't hold back to play with it! | |
# soundcloud: https://soundcloud.com/hopbit/live-coding-session-2016-05-14-count-on-me | |
use_bpm 130 | |
set_volume! 1 | |
ch1 = [62,65,69] | |
ch2 = [63,67,70] | |
ch3 = [65,69,72] | |
ch4 = [67,70,74] |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
use_debug false | |
use_bpm 130 | |
# Our mixer! | |
master = (ramp *range(0, 1, 0.01)) | |
kick_volume = 1 | |
bass_volume = 1 | |
revbass_volume = 1 | |
snare_volume = 0.5 | |
hats_volume = 0.5 |
# Ambient experiment for Sonic Pi (http://sonic-pi.net/) | |
# | |
# The piece consists of three long loops, each of which plays one of | |
# two randomly selected pitches. Each note has different attack, | |
# release and sleep values, so that they move in and out of phase | |
# with each other. This can play for quite awhile without | |
# repeating itself :) | |
live_loop :note1 do | |
use_synth :hollow |
# ------------------------------------------- | |
# CRASH INTO SONIC PI! | |
# Learn to code music in less than 30 minutes | |
# ------------------------------------------- | |
# - download Sonic Pi from sonic-pi.net | |
# - copy and paste these code snippets | |
# - change and experiment with the snippets | |
# - go! | |
# ------------------------------------------- | |
# These snippets were made for a workshop to |
# play it with Sonic Pi v.2.9 (http://sonic-pi.net) | |
notes = { dd: 74, c: 72, bbbbbbb: 83, ffff: 77, aaaaaa: 81, cccccccc: 84, eee: 76, ggggg: 79 } | |
notes.keys.map { | key | key.to_sym }.sort_by(&:length).each { |key| | |
play_pattern [notes[key]] | |
} |
# calculates maximum heart rate for woman | |
# formula by sally edwards | |
def hr_max_woman(age, weight) | |
return 210 - 0.5 * age - 0.022 * weight | |
end | |
# calculates maximum heart rate for man | |
# formula by sally edwards | |
def hr_max_man(age, weight) | |
return 210 - 0.5 * age - 0.022 * weight + 4 |
for i in {1..9} | |
do | |
wget "https://raspberrypi.org/magpi-issues/MagPi0$i.pdf" | |
done | |
for i in {10..42} | |
do | |
wget "https://raspberrypi.org/magpi-issues/MagPi$i.pdf" | |
done | |
# http://www.cyberciti.biz/faq/bash-for-loop/ |