Thursday, July 5, 2018

Vue.js builds for non-root web directories

The React’s lack of scoped CSS annoyance made me want to try Vue.js, which solves this problem right out of the box. And so far, I’m liking this framework quite a lot, I must admit. The idea of single file components pleases me greatly.

This morning I stomped over a problem: I was generating a build release to run under a non-root directory in my web server, and the application was getting lost by searching the files at the server root.

Fortunately I’m using vue-cli v3, actually 3.0.0-rc.3, which has quick solution, as I found here.

Sunday, March 11, 2018

Capitalization Rules for Song Titles

I found this guide back in 2007, provided by Standard MIDI Files on the Net, how defunct. I kept it on a TXT file on my hard disk for 11 years, and I rediscovered it today. And it’s still great, so I’m publishing the original here.

  1. The first and last words are always capitalized, and all except the words listed below are capitalized.
  2. These are lower-case, unless they are the first word or last word.
    • articles: a, an, the
    • conjunctions: and, but, or, nor
    • prepositions that are less than five letters long: at, by for, from, in, into, of, off, on, onto, out, over, to, up, with
    • as (only if it is followed by a noun)
  3. Prepositions are sometimes capitalized.
    • Prepositions are capitalized when they are the first or last word.
    • Prepositions that are part of two-word "phrasal verbs" (Come On, Hold On, etc.) are capitalized.
    • Prepositions that are over four letters long. (across, after, among, beyond, etc.).
  4. These short words are capitalized. Some people occasionally forget to capitalize these.
    • also, be, if, than, that, thus, when
    • as (if it is followed by a verb)

A List of Some "Phrasal Verbs"

These are some phrases in which the preposition needs to be capitalized.

Beat Up        Do Over         Go Over       Make Up       Take After
Blow Out       Fill In         Hand In       Pack Up       Take Back
Break Down     Fill Out        Hand Up       Pass Out      Take Off
Break Into     Get Along       Hold On       Pick Out      Take On
Break Up       Get Around      Keep On       Pick Up       Take Up
Bring Up       Get By          Keep Up       Put Away      Talk Back
Call Off       Get Over        Leave Out     Put Off       Talk Over
Call On        Get Through     Let Down      Put On        Throw Away
Call Up        Get Up          Look For      Put Out       Try On
Carry On       Give Back       Look Into     Put Up        Turn Down
Come Back      Give Up         Look Like     Roll Over     Turn In
Come Down      Go Along        Look Out      Run Into      Turn Off
Come On        Go Away         Look Over     Run Out       Turn On
Come Out       Go Away         Look Up       Run Over      Use Up
Come Over      Go On           Make Out      Show Up       Wait On

Friday, February 16, 2018

Alternative approach to bitflags in C++

Just wondering about a short, expressive and alternative way to implement bitflags in C++11.

Right now I don’t plan to adopt this idiom, but it doesn’t look so bad.

Wednesday, February 14, 2018

One grid to rule them all

I’ve just learned CSS Grid. It feels like an improvement over Flexbox, and although it’s more powerful, it’s actually a little simpler to wrap your head around. I liked Flexbox a lot, and I did many great things with it. I’m hoping to make even more stuff with Grid now. Newer browsers have been supporting it since last year, so if older browser compatibility is not an issue, it’s good to go.

I learned Grid in a couple minutes by watching this video, which is pretty good in teaching the concepts:

Friday, February 9, 2018

I hate the invasive Dropbox client

Very hard to completely disable the Dropbox client, which sneaks its updater into every corner of my new Windows 10 system. Here’s what I had to do to finally get rid of it:

  • On Dropbox client, Settings, uncheck start automatically;
  • Disable “DbxSvc” and two “Dropbox Update Service” in services.msc;
  • Disable startups at Task Manager > Startup tab;
  • Disable services in Control Panel > Task Scheduler > Task Scheduler Library.

I want Dropbox client to update only when I run Dropbox. This invasive behavior is completely unnecessary.

Sunday, January 7, 2018

Ibanez JPM weight

I’ve been searching around the weight of an Ibanez JPM, just like the P2 I own, which I have no means to weight right now. I found 4 guitars on, with similar measures:

  • 2000 P2, 7 lbs 5 oz, 7.31 lbs, 3.32 kg
    • nut profile, .740", 18.8 mm
    • 12th profile, .820", 20.8 mm
  • 1998 P4, 7 lbs 6 oz, 7.38 lbs, 3.35 kg
  • 1998 P4, 7 lbs 6 oz, 7.38 lbs, 3.35 kg
  • 1995 P2, 7 lbs 6 oz, 7.38 lbs, 3.35 kg

The JPM seems to be a very consistent guitar, even in the weight.

Wednesday, December 13, 2017

A div with a post-it 3D look

This just caught my eye while reading this thing. At first I searched for the image, but to my surprise it was all about CSS sorcery:

      .postit {
        position: relative;
        display: inline-block;
        width: 250px;
        border-bottom-right-radius: 36px 12px;
        padding: 15px 15px 10px 10px;
        border: 1px solid #e0dcbf;
        background-color: #fff8dc;
        margin-bottom: 12px;
      .postit::after {
        content: "";
        display: block;
        position: absolute;
        width: 80%;
        height: 30px;
        bottom: 18px;
        right: 18px;
        z-index: -1;
        transform: rotate(3deg) skew(8deg);
        box-shadow: 13px 18px 6px rgba(0,0,0,0.3);
    <div class="postit">text</div>