PHPNews

My extinguished kindle

Last night I reached for my Kindle to continue reading 1984. I had just started part 3 of the book and a big turn of events had just happened. Except, I couldn't. My Kindle's screen had cracked. Or the e-paper in particular. After doing some quick reading, it seems that this is fairly fatal for a Kindle and it was …

Continue reading »

Written by Remy Sharp - - Aggregated on Friday May 18, 2018


I use the terminal a lot and aliases are a great way to both personalise my command line experience, but also to make some tasks a little easier (and sometimes, smarter

Continue reading »

Written by Remy Sharp - - Aggregated on Wednesday April 25, 2018


Quick tip for node modules

When writing my node modules, I've come to really quite enjoy using Jest for testing (I've written about how I used tap and it's quite similar). Sometimes however, being able to execute the module on the command line and passing some arbitrary data can be pretty handy, and I've used the following technique on a …

Continue reading »

Written by Remy Sharp - - Aggregated on Thursday April 12, 2018


Why I have a limited company

I've been asked a number of times over the years why I chose to run my business under a limited company, specifically Left Logic instead of running the business under my own name – since, for the majority, hiring Left Logic is hiring Remy Sharp. So I thought it would be useful to post it here (partly for me, partly …

Continue reading »

Written by Remy Sharp - - Aggregated on Thursday March 29, 2018


Last minute node debugging

I'm working on a node project that I need to debug, but I didn't start it with the --inspect flag. Moreover, I'm using nodemon to restart node (which makes this process a little trickier). Finding the node process id The first task is to find the node process id (aka PID). The way I do this when running …

Continue reading »

Written by Remy Sharp - - Aggregated on Saturday March 3, 2018


Headless Raspberry Pi setup

The following information is scattered around the web and it's taken me a few times to find it each time, so I'm putting it here for safe keeping. As much as I love the Raspberry Pi's, I rarely have a mouse and keyboard handy for setup, and nearly all concessions, I want to run the Pi in headless mode (and ssh into …

Continue reading »

Written by Remy Sharp - - Aggregated on Sunday February 18, 2018


How to cross post to Medium

At some point during 2017, Medium decided to pull their IFTTT applets that allows content to be posted into Medium. Which I think is a pretty shitty move since there was no notification that the applet was pulled (I only noticed after Medium just didn't contain a few of my posts), and it smacks of "Medium should be …

Continue reading »

Written by Remy Sharp - - Aggregated on Thursday February 1, 2018


Open source with a cap in hand

Nodemon was first released in Oct 2010 ( via twitter no less ). To date, nodemon has had 1,024 commits - 184 of which were the community, the rest being from me - runs with over 150 tests (mostly integration tests) had 144 releases into npm, starred over 13,000 times, has had 883 issues closed, merged 331 PRs (mostly …

Continue reading »

Written by Remy Sharp - - Aggregated on Wednesday January 10, 2018


A clean exit

I was running some tests recently using Mocha and I wanted to re-run the tests when files changed. Typically this kind of functionality is built into test runners, but a) I'm not that familiar with Mocha (meh, it's just a tool) and b) I've got nodemon (which I wrote)

Continue reading »

Written by Remy Sharp - - Aggregated on Monday January 8, 2018


To gist and back again

I've recently been using gists to help debug user issues on nodemon. The process is two parts: firstly getting the original files up into a gist (ideally pared down), and secondly downloading each file to my local dev environment. Using two tools, I'm able to simplify this workflow pretty nicely, so I can go to …

Continue reading »

Written by Remy Sharp - - Aggregated on Friday January 5, 2018


My 2017

Continuing with my previous run of year in reviews (going back to 2007), here's my little entry to close out 2017 on my blog. I use these posts as a place to allow myself to both look back at my year, but also in future years to time travel back to what I did. Having just read my 2016 entry a lot of crap went …

Continue reading »

Written by Remy Sharp - - Aggregated on Sunday December 31, 2017


Is jQuery still relevant?

I've been cruising the reddit listings recently and without much searching I found a staggering amount of "jQuery is outdated" , "jQuery isn't relevant" , "I think jQuery is dying out" , "…forget about jQuery. It isn't good for anything anymore" , "jQuery hasn't been relevant for years in my opinion, it's best to …

Continue reading »

Written by Remy Sharp - - Aggregated on Friday December 15, 2017


Learn more about vulnerability alerts

I personally hate the posts that include "considered harmful"…and yet, here we are. My first "considered harmful" post. Hopefully my last, but we're still young on the web. Github has launched security alerts recently, and as much as I hate to write, I think the first swing at it is considered harmful . …

Continue reading »

Written by Remy Sharp - - Aggregated on Friday December 8, 2017


Where do those node warnings come from?

This is a micro post with a tip that I'll need to remember again in the months to come. Node.js can emit warnings on the terminal saying that a rejected promise wasn't caught, or calling an asynchronous function without callback is deprecated. But where exactly is the original call that causes that warning? …

Continue reading »

Written by Remy Sharp - - Aggregated on Monday December 4, 2017


tldr: a command line tip

Happy weekend: I wanted to share this pretty neat command line tool I came across very recently. This weekend I shared this tip with the individuals who bought my terminal.training (30% off this cyber weekend only!).

Continue reading »

Written by Remy Sharp - - Aggregated on Sunday November 26, 2017


Binary strings…and -1

Working with (quite) a few projects that required binary representations of data, I wanted to note down the right way to get a binary string. In particular when handling negative numbers… A cheap and easy way of getting a binary string for a number is to use toString using base 2: const n = 39; // a …

Continue reading »

Written by Remy Sharp - - Aggregated on Friday November 24, 2017


Thoughts and learning from ffconf 2017

Since running ffconf 2017 last week, and having the unique position of seeing all the talks twice , there's been a whole load of items I'm starting to put into practise, already seeing in my own work, or importantly: want to share a few of these with you. One huge caveat that goes with this post: there's so …

Continue reading »

Written by Remy Sharp - - Aggregated on Friday November 17, 2017


Dear Dizzy

Dizzy. Our stripy cat. A stow away in Julie's handbag when we intended to only take home two cats - instead we left with three. Dizzy by name and truly dizzy by nature. I wanted to write something in tribute to our Dizzy. He was with us for 12 years, and this month he fell quite quickly sick. It was so sad …

Continue reading »

Written by Remy Sharp - - Aggregated on Monday October 30, 2017


ES6: Default arguments

Default arguments in ES6, put simply: I'm a huge fan. I wanted to document a few of the ways I use default args and how they've made my old ES5 workarounds go away in favour of a much more elegant code design. The backets-or Here's my original function. It takes an argument for the DOM node to append a …

Continue reading »

Written by Remy Sharp - - Aggregated on Wednesday October 25, 2017


Dive into bitwise not and numbers

Sometimes you want to perform bit operations in JavaScript, and due to it's mutating nature, it's easy to get in a muddle. I recently wanted to run a bitwise not on 0FF (cyan) expecting F00 (red) and of course that's not what I saw, so I've written up (so I remember) how it works. Bits Everything is …

Continue reading »

Written by Remy Sharp - - Aggregated on Friday September 8, 2017