code Archives ⋆ Duncan McKean

sonic pi exploration three

exploration three

By code, Music

This is a Sonic Pi song.

It looks like this:

use_synth :hollow
with_fx :reverb, mix: 0.7 do
live_loop :low do
sample :ambi_dark_woosh
play 42
sleep 7
live_loop :deep do
play choose([:b3,:c3]), attack: 6, release: 8
sleep 4
live_loop :synth1 do
play choose([:b4,:c4]), attack: 6, release: 6
sleep 8
live_loop :synth2 do
play choose([:b3,:c3]), attack: 6, release: 6
sleep 4
live_loop :synth3 do
play choose([:A3, :Cs4]), attack: 5, release: 5
sleep 11
live_loop :beats do
sample :ambi_choir, beat_stretch: 8, attack: 5, release: 6
sleep 9
live_loop :boom do
with_fx :reverb, room: 1 do
sample :bd_boom, amp: 20, rate: 0.5
sleep 8
live_loop :chime do
with_fx :echo, phase: 0.125 do
play 50
sleep 5
sample :elec_plip
sleep 4
play 62

It sounds like this:

lines of computer code Drupal demo

Create a temporary Drupal demo application (macOS)

By code

This is an amazingly quick way to create a fully working Drupal demo on your computer. It’s perfect for mucking about with and exploring before you take that deep dive into theme, module or software development.

Drupal Demo Requirements

  • Terminal
  • PHP 5.59+ (included with macOS)

Create a new directory for the instance and move into that directory:

mkdir drupal
cd drupal

Download the latest recommended version of Drupal into this new directory:

curl -sSL https://www.drupal.org/download-latest/tar.gz | tar -xz --strip-components=1

Start the built-in PHP web server and install the sample theme:

php core/scripts/drupal quick-start demo_umami

This will also open your browser all ready to log in.

That’s it. Easy. And of you need help then:

php core/scripts/drupal quick-start --help
Page of Code

Coding Update

By code

I’ve moved to learning JavaScript. The reasons are:

I think that’s good enough for me. Here are two free resources to learn:

And here’s some paid ones:

It’s also because I’m running a course at the end of the year using React, JS and Node and I want to up my coding game before then. D



I like your hair.