• Skip to primary navigation
  • Skip to main content
  • Skip to footer

BobbyVoicu.com

Curious about stuff

  • Home
  • About Me
  • Blog / Archive

Learn to program

htaccess 301 redirects

May 22, 2021 By Bobby Voicu

I’ve moved a lot of the sites over years from one domain to another, but I never remembered the htaccess redirect rules to do it. I always needed to search for them, sometimes finding different solutions that were never perfect.

Anyway, here are some of them, in case I need them again. I took them from this site, which has a lot more situations sorted out through redirects.

How do you redirect an entire site or domain to a new one?

Redirect 301 / http://www.domain.com/

How do you use rewriting to redirect from an old domain to a new domain?

RewriteEngine on
RewriteBase /
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

How do you use rewriting to redirect from a non-www to a www subdomain?

RewriteEngine on
RewriteBase /
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

From here: Common Htaccess 301 Redirect Rules.

Regex crossword and puzzle

September 13, 2019 By Bobby Voicu

One of the things I wished I understand a whole lot better is the regex rules. While I can hack an already existing rule to adapt it for my own needs, I can’t start one from scratch. To be fair, I don’t think I can adapt one if my need is more complicated.

Recently I’ve discovered Regex Crossword and I’m having fun with it. I test myself from time to time, when I get bored. Who knows, maybe something will actually stick.

Here’s what they say on their About page:

Regex Crossword is a crossword puzzle game, where the crossword clues are defined using regular expressions. The site is created and maintained by Maria Hagsten Michelsenand Ole Bjørn Michelsen. Everybody can play and it is a great way for newcomers to learn regular expressions and for experts to practice their skills.

via

Raspberry Pi 4: First thoughts

August 6, 2019 By Bobby Voicu

Every time a new version of the Raspberry Pi appears, I go nuts for several days, fantasizing about things I could do, like build a robot, an entire smart home or whatever. I read what you can do with the Raspberry Pi 4 in this case, I look for articles, for subreddits, everything.

Then I order the new version. It usually takes 2-3 days to receive it and by that time my excitement is less… excited. Of course, once I receive it, the excitement (or a big part of it) comes back. I unpack it, I mount it in the case, add some heat sinks, then I look for an HDMI cable.

Once I’ve done everything required with the hardware, it’s time for software. I download the latest Raspbian image (Buster, at the time of writing this) and I put it on an SD card. It takes a little bit of terminal tinkering, but it works usually right from the start.

Finally, the moment I’ve been waiting for: powering up. It takes around 5-10 minutes to go through all the steps to initialize the new system, including the updates.

And here it is: Rasbian installed on the Raspberry Pi 4. But what’s next? I’m still waiting to find out, frankly. If you have and suggestions, let me know.

The things I noticed about the Raspberry Pi 4 (see official specs here):

  • my version has 4GB of RAM, so I thought it would feel faster. It doesn’t
  • I got the standard case, the recommended USB-C charger, small heatsinks, but I forgot to get an HDMI cable or adapter
  • you don’t have a standard HDMI port, so you need to have a MICRO HDMI to standard HDMI cable or adapter (see difference here). I forgot about it when I ordered the Pi, so I needed to go and buy one before I got the Pi delivered. But I would’ve been really disappointed if I got the device and I couldn’t connect it to the monitor right there and then. Just be careful not to get the MINI HDMI to HDMI, but the micro.
  • it heats a lot. I’ve used the Pi for about 15-20 minutes for light browsing (no YouTube or anything similar), I’ve done the updates. It is really hot after that amount of time, even with the heatsinks installed. I will buy the Flirch aluminum case, that acts like a big heatsink and has good reviews. I don’t want a fan because of the noise.
  • Retro Pie doesn’t work with Raspberry Pi 4 on Raspbian Buster just yet, unless you do some kind of hacks and I don’t want to. I’ll wait for the working version.

I’ve been using MacOS computers for the last 10 years or so, but I sometimes miss Linux (any version of it). So the Pi will scratch that itch from time to time.

I’ve finished the free Practical JavaScript course

June 22, 2017 By Bobby Voicu

And I’m happy about it, so I thought I’d write a blog post.

If you don’t know what I’m talking about, here it is: a reminder.

The course itself is not that difficult, especially if you’ve written code in your lifetime. I understand some things better now (like what this means in a method) and I signed up for the advanced course (which is paid). I didn’t watch any of the new videos yet since I’ve been a little bit busy these days (with the RebelBio office hours and other things, like taking my girlfriend to Wonder Woman – the first movie we see in the cinema in Cork since we moved in).

I’m quite excited about the new course since it goes deeper on the subject of JavaScript. People that went through it really enjoy the fact that it teaches you to read code somebody else wrote, which is really helpful for me. I want to hack things around to create MVPs, so I need to be able to read the code and use bits and pieces to get my ideas to life in a short time frame.

Oh, and read this article from Derek Sivers. Combined with the “Quantity over Quality” article on my blog, it really made me think about writing more on this blog. So expect more :D

—————————

Photo: yes, that’s a badly taken photo of my monitor while watching one of the coding tutorial videos. I want to use more of my own photos (no matter the quality) instead of stock ones on this blog. And, yes, Ireland is colder than I’m used, ok? :D

Thinking of coding

May 18, 2017 By Bobby Voicu

I wrote my first piece of code when I was 6 or 7, I think. My best friend’s father – a Maths teacher – was approved by the Romanian Communist Party to buy a Sinclair ZX Spectrum computer. I remember that between playing games, he showed us how to put our name on the screen (and keep it there indefinitely, until the Scroll? message – or something like this – would appear):

10 PRINT “Bobby”
20 GOTO 10

Having access to a computer in communist Romania was really difficult, to say the least. I was lucky that I found out they existed while I was young enough and that there was a computer club at the “Pioneers’ House” where you could go and learn to program in BASIC (using ZX Spectrum clones that looked like WW1 phones).

Years later, I learned to program in PASCAL, then C. I also dabbled in PHP. Then I started to write content and I started companies. So I stopped programming.

But I miss it. I miss being able to think of something and being able to put together the lines of code to do it. I want to be able to create the MVPs for the ideas I have.

This is why I decided to relearn programming. Following suggestions from some good friends, I chose JavaScript. It allows frontend programming, as well as server side (through node.js) and I can use a wrapper and put the result in the mobile app stores. So, the perfect tool for an early MVP.

I found an applied course of JS and I’m starting from there. It’s nice because you basically follow on-screen examples and I’m better learning through hacking rather than going through the fundamentals first and so on. Another good way to learn is this described here by Derek Sivers. It’s not really for me, though, even if I reached the 6th or 7th chapter of the book he recommends.

What do I want to build? Nothing in particular, but keep an eye here to find out as the ideas come out :)

Oh, I don’t have that much time to dedicate to this, so progress will be slow. But at least there will be some progress, I promise you!

Footer

About

I write about things that raise my curiosity. And I’m quite curious about all kinds of things.

For a full “About Me”, go here.

Recent Posts

  • My Bluesky ID: @bobbyvoicu.com
  • Batman is Here, on the Quest – XR Industry News of the Week – Oct. 24
  • XR Industry News of the Week – Oct. 10
  • XR Industry News of the Week – Oct. 4
  • XR News of the Week – September 14th, 2024

Friends

  • Sami the Westie
  • XR Gamer Digest

The CEO Library Collections

  • Best Leadership Books
  • Best Productivity Books
  • Women Entrepreneur Books

Copyright © 2025 · Privacy Policy · Disclaimer

We use cookies to enhance your experience. By clicking "Ok" or by continuing to use the site, you agree to this use of cookies and data. Ok