alxndr's blog


`console.log()` meta tags

Sure can be annoying looking through HTML source trying to find all the <meta name="whatever" content="something that search engines love" /> tags that the super-expensive SEO consultant said you absolutely must add…​ Here you go, crack open Chrome’s

Continue Reading

hapi: unset a cookie

…​because the documentation for Hapi is awful: If you’re trying to reply().unstate("cookiename") and it Just Won’t Work, look for how you set that cookie. If you used reply().state("cookiename", value, cookieOptions), you need to include those

Continue Reading

how to find the merge where your code disappeared

Because I keep forgetting that I originally put this on the twitters…​ git log --patch -m -G regexForMissingCode (Neither of those short options have long names…​) About -m: This flag makes the merge commits show the full diff like regular commits;

Continue Reading

eslint: Cannot read property 'value' of undefined

Are you seeing ESLint throwing an error like Cannot read property 'value' of undefined TypeError: Cannot read property 'value' of undefined at getStarToken (.../node_modules/eslint/lib/rules/generator-star-spacing.js:68:25) ... bunch more stack trace here It might be that you’ve put

Continue Reading

don't be scared of merge conflicts

First things first: it can be a lot easier to resolve merge conflicts when you can see what the code looked like before the edits which are now conflicting. Git calls that the "common ancestors" of the conflicting lines of code, and it’s

Continue Reading

use a Dvorak keyboard layout on iOS Simulator

…​why would anyone want to have Dvorak on a mobile device?!? Actually, I only care about it in the iOS Simulator, when I’m using it on a computer with a real-live hardware keyboard. In OS X’s Simulator (v9.3)

Continue Reading

notes for npmCamp 2016

Isaac Schlueter history of npm node.js had no sharing story; turned a bash script into a node project & sent package.json PRs to repos it becoming a thing that pros ~2013 used was a dramatic change; SCALING semver "not magic, not math… still

Continue Reading

version control commit messages

Here is how I like to structure my Git branches and commit messages. philosophy First, some reasons behind my madness…​ My primary motivation with caring so much about commit messages is the value I’ve gotten from referencing well-written commits that others

Continue Reading

linking to code? always use an href which is tied to a specific commit

tl;dr Don’t use links like github.com/owner/repo/blob/master/file.ext#L13 because that branch will change! Use github.com/owner/repo/blob/COMMIT_SHA/file.ext#L13 and be future-proof. Are you creating a link to a specific line

Continue Reading

search Git history, ignoring certain directory

Ever wanted to look through a Git repository’s history for a commits involving a specific string, but ignoring a certain directory (e.g. for packaged/built code)? As of Git 1.9, you’re in luck! In the file listing, you can

Continue Reading

getting Hound-CI to show Rubocop "cop names" again

Thoughtbot’s Hound-CI service runs Rubocop on Ruby projects. It had a setting to show the name of the "cop" (style rule) that failed, which made it easier to look up the options for that specific rule. At some point, the way that was

Continue Reading

installing an old version of something via `brew`

Don’t need to brew edit or check out old SHAs inside /usr/local/Library any more: just brew switch [project] [version]. Shiny!

Continue Reading

how to mark an email as "not-spam" in Google's Inbox

I’m using Google’s Inbox mail client for work email. Recently I noticed that an email in a thread was marked as being spam, and couldn’t find a way to tell Inbox that this automated email wasn’t actually

Continue Reading
alxndr's blog