I’ve recently made a small update to my blog, and I’d like to share the how, the why and the what. I’m also going to take the time and ask you to provide me some feedback on my posts from now on, since this small update enhances just that.
Back Together
Yes, yes, yes, I know what you might say. It will probably be around the following:
- New theme, wth?
- Merging dev and normal, wth?
- Why is this so flashy, wht?
- …wth?
Yeah, I know, a lot of wth s so… let’s get right to it. I have merged my two blogs (main and dev-blog) for two reasons. I’ll detail them in this post, as brief as I can. I’ll also detail the changes to the website itself, and what juicy new things you can find over here including:
- Adaptive Tutorial Design – example
- Better linking for Rants and Tutorials (also Romanian posts) – rants, tutorials, romanian posts
- Better real-estate usage on all pages
Use for the Pi
A few days ago, I described my Trek through Raspberry Pi and Wifi configs (including APs). Today, I want to talk about a possible use for such a setup.
TL;DR:
The simple CLI I had in mind isn’t working right now. I ended up using MPD (more exactly: Mopidy) with both a CLI client and a Web client, either of them work fine.
At first I wanted to use it to compile my apps, and serve them. Note, I’m using WebPack to compile my app, with a lot of plugins on the way. I thought my Pi would be strong enough to do that, even at a slower pace, but after 10 minutes of waiting for webpack to boot, I gave up. Ironically, as per Murphy’s laws, as soon as I disconnected the Pi from a power source I saw that it finally made the initial compile. It wouldn’t have been efficient anyway.
My second idea then was to make it a remote Spotify client. I didn’t want much from it: just a command line interface so I could pick / skip a song, volume control was optional.
Full process supplied below:
Despotify
The first thing I found that would match my criteria was Despotify. It’s supposed to be a simple CLI version of Spotify that would work with Spotify premium accounts. Turns out, it’s not working that well.
First off, I used this guide to set things up (and I do recommend following up if you intend to try it out yourself), but ended up changing a few things.
For instance, at Part One - Step 2 that command no longer works. Here’s how to fix it:
and the cloning will work. Secondly, the build-script needed a change for my setup (might not apply to all). To use my fix, edit
and edit line 1
Makefile
like so:1
9
and that will get rid of the installation problems you might have later on. This has, however made my installation not work at all. The simple util will crash on any attempt, and the GUI (-ish) one will not even make a single search. Perhaps I did something wrong (like lpthread being crucial and me being an idiot for not making sure it exists and just ignoring it).
Enter Mopidy
Mopidy is a nice wrapper over MPD, which (as linked above) is a media server of sorts. Mopidy will allow you to stream Spotify from a local server. I followed their installation and configuration guides, especially those with regards to the raspberry pi. Something that was not very clear from the instructions is that you actually need to install the Spotify Extension and a UI / client for it to work properly. I used the extension, Mopify web client and ncmpcpp as a gui client. Both kind of work the same, but different at the same time. Mopify can access the Songs library, and generally works better, while ncmpcpp works without http and can only access playlists. Both, however, work just fine with next/previous/play/pause. Here are the steps to get these started:
From here, just some configuration is needed. Here is mine, for comparison:
1
~/.conf/mopidy/mopidy.conf
At this point, I could access the web client (mopify) by going to:
1
http://<Pi's address>:6800/
and use the GUI there, or ssh into the Pi and use ncmpcpp:
It is a very slow process especially if you have a large library like mine. More often than not it’s a long wait until a song starts, but the streaming is good, and the quality is at least decent. Hope this helps someone.
Until next time, ‘ave a good one!
Raspberry Pi - Wifi
So… I’m going to start my ramblings by talking a bit about my trek through configuring a damn Raspberry Pi to work the way I wanted to. Specifically, I wanted to be able to SSH into the damn thing whenever I may so desire, regardless of what device I have with me or what networks I create…
Starting up
Why another blog?
Well, two reasons. I want to explain myself a bit, so I’ll keep it short and simple for now.
There are two reasons for creating a Dev blog
-
One is the obvious reason of separating normal blog posts with the more techy ones. To be fair, I needed a small change in layout anyway, and this theme and setup seemed awesome at the time.
-
Secondly, I’ve been posting a lot on Facebook, letting the world know on what I’m learning and my opinions and stuff… And some people suggested I start a blog instead – hint taken, I’ll spamming your walls :)
And well, we’re here
To be perfectly frank, I’ll either spam the hell out of this blog, or ignore it like I usually do.
Time will tell
Tutorial Vagrant
Introducere
În ultimii ani, virtualizarea și standardizarea mașinilor virtuale a devenit un subiect din ce în ce mai dezbătut, și populat de diferite sisteme ce își doresc a face acest subiect o realitate cât mai accesibilă. Unul dintre aceste sisteme, realizat modular, este Vagrant. În următoarele rânduri vom vorbi despre ce este mai exact Vagrant, cum funcționează și cum se instaleaza și configurează acest sistem.
Ce este Vagrant?
Dacă veți căuta pe Google Vagrant, veți obține aproximativ următoarea definiție:
Vagrant este definit ca
. Într-un fel, această descriere se potrivește destul de bine software-ului Vagrant.1
o persoană fără un cămin stabilit sau job stabil ce se mută din loc în loc