NBA Playoffs 2016 second round recap

The second round of the Playoffs has come to a close, and it’s been a nice mixture of surprises and things that went almost exactly as anticipated.

East

1. Cavs vs 4. Hawks

Despite my Cavs in six prediction, early in the series it was clear that Atlanta didn’t stand a real chance against these Cavs, that have now a full 10-men rotation in place, and that have found an exceptionally great mojo from downtown. They played four games in both of their rounds so far, which means not so much playing time and lots of rest, which will surely come in handy in the conference finals.

2. Raptors vs 3. Heat

Could I have been any more wrong about this? I don’t think so. The injuries to Valanciunas and Whiteside proved to be tough to overcome, but the series has given us plenty of highlights: Dwyane shining like its 2010, the initial struggle of Lowry that was able to recover from his slump and make huge plays in games 5, 6 and 7, and Bismack Biyombo running for Toronto’s mayor office. The Raptors reached the conference finals for the first time in their history: they won’t get much farther away than that, but boy was this a great playoff run!

West

1. Warriors vs 5. Trail Blazers

I predicted Portland to be able to win at least a couple in the series, but I clearly though that Curry’s injury would impact the Warriors much more severely. What Steph has done in game 4 is something, yet another thing, that you’ll likely tell your grandchildren. Golden State went through some moments though in which they didn’t look completely in control, and will have to get some things in order (Green techs, for one) before the conference finals, since…

2. Spurs vs 3. Thunder

… the Thunder pulled off the biggest surprise in these Playoffs so far, by convincingly slamming away the Spurs in six games. Westbrook wasn’t probably at his best, Durant looked great, which is something that we haven’t seen in a while, and their phisical presence was phenomenal against a San Antonio team that failed at doing what they do best than everyone else, which is executing on offense. Two names stand above the others: Steven Adams, a true presence in the paint, and Billy Donovan, a rookie coach straight from college that has made the one thing that few, me included, thought possible, which was instilling a winning mentality in his guys.

Conference finals predictions

East

1. Cavs vs 2. Raptors

Toronto won the season series against Cleveland, but it’s clear that these Cavs are something else. They’re playing with confidence, and if the shots are going in like they have, it’ll all be over soon. Still, the Raptors have the men to guard both the perimeter and the paint (also, how about giving James Johnson some minutes now?), and if DeRozan gets a little confidence (that’s a giant “if”), they might be able to sneak a couple of wins. Cavs in 5.

West

1. Warriors vs 3. Thunder

This series is much closer to call than it would seem. OKC have the confidence on their side, they lost the regular season series against Golden State, but they were the ones that looked best against the Warriors. Again, Golden State must regain some composure and some flow, they desperately need to have Green mentally in control, and they need to have Harrison Barnes back in it, since he has been a non-factor so far. Steph gonna Steph, KD gonna KD, Russ gonna Russ, and the Thunder better pound the inside, with Adams and Kanter. All I want for Christmas is this series to last seven games. Warriors in 7.

How to deploy on a production server from your local Git repository

If you’re like me and began to do what you do more than a decade ago, you’ll definitely remember how we all used to push updates to our production servers via FTP. There’s no shame in that: we’ve all been beginners.

Using FTP might even be fine today for teeny-weeny projects, but two things are for sure:

  1. it’s slow,
  2. it will almost always lead to uncertainty regarding the syncronization between your local copy of the project, and the remote one on the server (even if I hear that some people still develop directly on a server, but that’s a rant for another occasion).

Luckily for us, we have version control systems such as Git and our work is never really lost.

So how can we avoid using FTP to upload updates to our production servers?

You set up a new repository that’s hosted on the very same production server you’ll project will end up on and also push updates to that repository.

So let’s assume that you have developed a theme for WordPress and you want to keep it in sync with your local copy.

I wouldn’t want to have the theme folder on the production server to host the repository itself, so I’d opt to set it up in a folder outside public_html and then listen for push events on that repository and perform a checkout of the project to the actual theme folder.

So, since I’m lazy, I’ve created a little script to make my life easier:

#!/bin/sh
rm -rf $1.git
mkdir -p $1.git
cd $1.git
git --bare init
cat <<EOF >hooks/post-receive
#!/bin/sh
mkdir -p $2
export GIT_WORK_TREE=$2
git checkout -f
EOF
chmod +x hooks/post-receive

You can create a file (let’s say create-repo.sh) in the folder that will host your repositories on the server, adjust the file permissions so that it can be executed (chmod +x ./create-repo.sh), and launch it with the following syntax:

./create-repo.sh repository-name path-to-actual-folder

This script does the following things in sequence:

  1. remove any pre-existing repository with the specified name,
  2. set up a new blank repository in a specific folder whose name is indicated by the first parameter (in our case repository-name),
  3. create a hook that is triggered upon receiving a push that will perform the checkout in the actual project folder (second parameter passed to the script, in our case path-to-actual-folder).

So, assuming that you have a standard WordPress installation in the root directory, you could create a repository that points to the themes folder:

./create-repo.sh your-theme-name /home/your-user/public_html/wp-content/themes/your-theme-name

The only remaining thing is to upload stuff to the production server, for which you’ll have to create a new remote pointing to the newly created repository through SSH and then execute a push towards said remote:

ssh://your-username@your-host.dev/~/repos/your-theme-name.git

assuming that you’ve created the repository in a repos folder in your home directory, which I’d recommend.

As you can see, this is nothing too complex, but it’s a pretty nice time saver nonetheless.

It’s only rock ‘n’ roll, but I like it!

The experience of walking through the city center of my town can be bizarre at times: you typically encounter various types of people and some of them are nothing short of cuckoo.

When you apply this scenario to street music, what you get are mostly unpleasant and annoying sounds, that really don’t fit well with being at work, trying to do something productive, while keeping windows open.

Today was an exception. There was a talented electric guitarist that was playing a few medleys not very far from our office, and the incredible acoustics of Genova’s caruggi (you should know what they are by now) brought his notes to my ears.

As soon as I stepped away from the office, I couldn’t stop my self from swinging by and capturing a video of his performance.

His name is Valerio Papa, and he’s got a Facebook page.

Keep it up, Valerio!

Caruggi

In Genova we’ve got a word that defines the typical narrow intricate street that form the historic center of our city, and that word is caruggio. There are hundreds and hundreds of those streets.

So today I found myself wandering around a few of them in search for a place to eat, and given the particularly pleasant weather, I took a couple of shots.

P1020097 P1020100 P1020111

NBA Playoffs 2016 first round recap

The first round of the NBA Playoffs is coming to a close and a few weeks ago I had been dumb enough to make predictions. Not all of the series are done yet and juicy game 7s between Raptors and Pacers, and Heat and Hornets await, but let’s see how it went anyway.

East

1. Cavs vs 8. Pistons

The Cavs convincingly swept the Pistons.I had predicted Detroit winning at least one, and from what we’ve seen they could’ve brought home one or two games, but in the end the difference in roster quality and depth was substantial.

4. Hawks vs 5. Celtics

I got this one completely wrong, but Atlanta has proven to be a great team on both sides of the floor, and they’ll be a match for Cleveland in round two for sure. The Celtics lost Avery Bradley early in the series, and despite the heroics of Thomas, couldn’t finish the job. Still, the future looks extremely bright for them.

2. Raptors vs 7. Pacers

At the moment of me writing this, the series is tied with three games apiece, and despite this, Toronto never looked completely in control. They’ve been outcoached, and Lowry and DeRozan have sort of been annihilated throughout the first six games, but luckily for Raptors fans the rest of the crew stepped up (Joseph!). Paul George has kept reminding me how good of a defender he can be. I still think that Toronto is going to make it, but that’s absolutely not a given.

3. Heat vs 6. Hornets

What a series. The Hornets bouncing back from a 2-0 deficit to grab a 3-2 lead away in game 5 was little short of epic, and so was Dwyane Wade’s final 5 minutes in game 6, to get things back in Florida. I had predicted Hornets in 7, but I feel like the momentum of the series has shifted towards more tropical climates.

West

1. Warriors vs 8. Rockets

Agony: after injuring his right ankle and his knee in the series, Curry is said to be potentially able to play before the Conference Finals start, which is a good news for Golden State, and one that keeps their championship hopes intact. The Rockets were a no match for the Warriors, playing with little character, with their stars fading out from the challenge.

4. Clippers vs 5. Trail Blazers

The Clippers are clearly taking the definition of “being jinxed” to new heights, and not having Paul and Griffin for game 5 and 6 surely made Portland’s life way easier. The Blazers proved to be a team, led by Dame, and supported by an incredible group of young players, including the MIP McCollum. I think they’re capable of creating a few troubles to the Curry-less Warriors.

2. Spurs vs 7. Grizzlies

At least I got one entirely correct, but the fate of the series was set in stone before the series even began. Again, props to Memphis and their coach, because looking legit with such a depleted roster is something that can’t go unnoticed.

3. Thunder vs 6. Mavericks

Oh, so I got two series right, in the end! The Thunder have always been in control, but it’s hard not to consider their efforts just a warm up to their upcoming battle with the Spurs that begins tonight.


Ok, that’s it. It didn’t go all that well, but it hasn’t been a catastrophe either. I might even improve my predicting skills for round two. So…

Round two predictions

East

1. Cavs vs 4. Hawks

Cavs in 6. Atlanta is great and is deeper than I thought, but Kyrie is playing like he never has, and with LeBron always being the basketball android we’ve come to know in the past decade, I can’t see this series going anywhere else than Ohio.

2. Raptors vs 3. Heat

Disclaimer: with two game 7s still to be played, it is only my assumption that the Raptors and the Heat are going to make it. Still, if this were the actual second round series, I would project the Heat winning in 5.

West

1. Warriors vs 5. Trail Blazers

Warriors in 6. Warriors are mentally tough (did you see their reaction to Curry’s knee injury?), and the Blazers are on a wild and partially lucky ride, it’s going to be a fun series.

2. Spurs vs 3. Thunder

I can’t imagine the Thunder winning this, against such a complete and experienced team such as the Spurs, and this is a problem for an organization that has winning the championship as their sole goal. I’d say Spurs for a couple of reasons: 1) I’m not ready yet to see Tim and Manu wave goodbye, 2) I’m not ready for anything else than a Warriors vs. Spurs Western Conference Final. So, Spurs in 5.