Morphex's blogologue (Life, technology, music, politics, business, mental health and more)

This is the blog of Morten W. Petersen, aka. morphex in various places. I blog about my life, and what I find interesting and/or important. This is a personal blog without any editor or a lot of oversight so treat it as such. :)

My Kiva bragging page
My shared (open source) code on PyPi

Morphex's Blogodex

Misc
Zope/Plone
News

Zope hosting by Nidelven IT

No description available

No description available

Get firefox

Morten Petersen on Linkedin

Morten Petersen on Facebook

Morten Petersen on SoundCloud

Blogologue on Twitter






Older entries



Atom - Subscribe - Categories

Taking a look at SASS, Compass & Zen Grid

OK, so a couple of days ago I got the idea that I should create a new personal website, which syndicates information from various sources into one channel, or page. That is, all my Youtube stuff, Tweets, stuff posted on SoundCloud, Instagram and so on.

Now, I've been using Python, Zope and Plone for many years, in work projects as well as personal projects. This time, I was thinking of creating something very simple, maybe even static HTML, Javascript and CSS files. Well, as for the static part, I think it is a good idea. The process for creating those static files could be done in any way though.

So I started looking at responsive design, and having a framework that delivers a lot seemed like a good idea. I ended up choosing Zen Grid because it felt right, a Ruby- and Compass-based framework for creating grid-based layouts. Ruby is a programming language, and Compass is a framework for creating CSS. I got Ruby installed, and got SASS, Compass and Zen-Grid installed using gem, an easy enough process, typing 'gem install sass', 'gem install compass', 'gem install zen-grid'.

OK, everything installed - fine. Now I had to create a SASS/Compass project, and the 'compass create <projectname>' command handled that. Creating a project creates some files, using the find command shows which files are present in my project right now:

morphex@infernal-love:~/apache/stats/tester$ find .

./config.rb
./index.html
./sass
./sass/ie.scss
./sass/print.scss
./sass/screen.scss
./stylesheets
./stylesheets/ie.css
./stylesheets/print.css
./stylesheets/screen.css

The sass directory contains the SASS files which will be compiled into the CSS files in the stylesheets directory. Now, first thing is first, and that's the web page. It is available here:

http://blogologue.com/stats/tester/index.html

If you look at the source of that file, you can see it's an example copied from the Zen Grid reference, with the E field commented out. This is because I saw the E field being moved down as content was being added in rows to the B field. I couldn't see any need to go beyond the D so it was just easy to remove it and don't have any headaches trying to figure things out.

The CSS file that gives this page its layout and colours is here:

http://blogologue.com/stats/tester/stylesheets/screen.css

And the SASS file that generated that CSS is here:

http://blogologue.com/stats/tester/sass/screen.scss

It's all fairly straightforward, and it is a nice simple way to create a layout on a web page.

A final note on these files, config.rb should contain

  require 'zen-grids'

to make all of this work, like my one does: http://blogologue.com/stats/tester/config.rb

For my part, I'm thinking it could be fun to create some tools in Python that pulls everything together, at least something that can generate HTML with information from all the different sites I post content to. It's easy to start over-engineering on projects like this, but maybe I'll also wrap Ruby, SASS, Compass etc. in a Python package to make these features easily available for Python. As well as look at including Zope's page template package to easily create templates.

Oh well, I'll get back to progress on all of this later. Tata. :)

[Permalink] [By morphex] [Web (Atom feed)] [Comments] [04 Dec 17:29 GMT+1]

A journey into music

OK, so been a while since I blogged the last time. Lots of things have happened, but the most important part is that I've gotten a lot better at relaxing and taking it easy.

I thought I had something to say about music, and what can I say.

Up until maybe a couple of weeks ago I was cranking out music and getting into the groove of creating music, creating demos & songs. And I'm not the one to blow my own horn but in my opinion I was creating some good stuff that would suit some audience.

Anyway, these last couple of weeks I've spent at the family hut. Some days after I arrived, a violin also came in the mail. Prior to going to the hut I was listening to a cover of Viva la vida made by the Dallas String Quartet if I remember correctly, and I was deeply moved by the violin in that piece.

A picture of the violin is here:

http://instagram.com/p/r7sBWrKKpD/?modal=true

So yeah, a violin arrived last week, but it's these last couple of days I've been getting to play on it. It's really just posture, grip and open strings now, but it is good fun. I guess I'm that grown up that I can just STFU and do whatever the instructor says.

I found the lessons by this lady

https://www.youtube.com/channel/UCLLxyaKSNav9f9Vqvp99npQ

To be nice, easy and simple to follow. Now, to be honest and as a side note I'm on a very limited internet connection, so instead of replaying the lessons in a browser, I used a Python tool called youtube-dl to download the videos and play them locally.

It's here: http://rg3.github.io/youtube-dl/

This means I get video files that can be played locally, without the advertisements. Not exactly sure what to do about the ads, but Youtube should create some app that can store videos locally with ads so everything is in order.

Funny thing is, I bought a harmonica about a year ago, at the local rock museum, but haven't played it much up until now. But some travelling, broken violin strings etc. kinda forced my hand with regard to what I could use and the harmonica (picture here http://instagram.com/p/sTI8PXKKp9/?modal=true) was the obvious choice.

I guess to sum it up, these last couple of weeks I haven't really been creating or pushing myself to do much creative work, just playing with new instruments, relaxing and winding down. Not sure when I'll get back to creating new music but I think that new music will involve some harmonica and violin playing. :)

[Permalink] [By morphex] [Music (Atom feed)] [Comments] [30 Aug 00:33 GMT+1]

Mac/Windows/Linux + Linux & VirtualBox & Hydrogen = True

OK, so I've been dabbling a bit with Hydrogen again, the IMO very good drum machine kit for Lunix..

I've been a user of Linux for a long time both on the desktop and server side, but lately I've been running Windows a lot because that's where Battlefield 4 runs, an FPS-strategical-tactical war game.

And every now and then I fire up Audacity to record something. Now, I've also got myself a set of digital drums to learn how to play the drums, but it's also nice to just be able to plot something into a program and have a nice, perfect drumtrack to go.

Now, Hydrogen doesn't run on Windows, so I figured I could have a copy of Hydrogen running in a virtual machine on Windows. I tried setting something up using QEMU, but after a while I just gave up because of many different bugs.

So, I ended up using VirtualBox and created an appliance which you can download here:

https://dl.dropboxusercontent.com/u/77290387/Hydrogen%20Debi...

If you don't have VirtualBox installed, get it installed and then import this (via the File menu in the VirtualBox main panel) and start it up and you'll have Hydrogen readily available.

This appliance has today's export (26th of July) of Hydrogen from Github running, so it's the latest and maybe even greatest version of Hydrogen available.

Give it a try why dontcha?

[Permalink] [By morphex] [Music (Atom feed)] [Comments] [26 Jul 21:04 GMT+1]

Chandelier, hydrogen and audacity

So I've been playing around with Sia's Chandelier this weekend, first finding the beat and then adding onto that.

I also started playing around a bit with Audacity (audio editing) and Hydrogen, a drum machine software kit for Linux. Audacity has some features line tone generation, which is nice for creating these deep tones, and it is possible to create custom drum kits for Hydrogen..

So here's a kit that has the lowest notes and cross-fades them out over 2.5 seconds: http://blogologue.com/c0-b0%20crossfade%20out%202.5s.h2drumk... - it gives the long punch to this thing: https://soundcloud.com/morten-w-petersen/chandelier-part-2

I know the chorus vocals could be a bit better but I have to draw the line somewhere, this is a hobby after all and something I do when I have the energy and the "lust". :)


[Permalink] [By morphex] [Music (Atom feed)] [Comments] [25 May 16:08 GMT+1]