David Walsh

Get Viewport Lines and Columns in CodeMirror

CodeMirror is an amazing utility for presenting code in a browser environment.  Syntax highlighting, widgets, and a number of advanced functions make it a unique, useful tool.  When using CodeMirror inside the Firefox DevTools debugger, I found that adding hundreds of column breakpoint widgets to very long lines of code really killed performance, and I […]

The post Get Viewport Lines and Columns in CodeMirror appeared first on David Walsh Blog.

Replace Last Command in Shell

Whether I fat-finger a command or my MacBook Pro keyboard’s keys don’t want to respond like they should, I’m frequently misspelling commands.  What’s more frustrating is that many of these commands are long, taking making fixing theme time-consuming. Luckily a Twitter follower is looking out for me, providing me a quick command for fixing the […]

The post Replace Last Command in Shell appeared first on David Walsh Blog.

Script & Style Show: Episode 28: “Get Off My Lawn”, and Other Software Stories with Eric Brandes

In this episode:  Todd and David kick things off bantering about cell phones, Android rot, and the good old days of Windows XP and piracy.  Todd’s colleague Eric Brandes gets us back on track with a discussion about trusting proven technologies, not chasing the latest fads, how TrackJS is able to provide an amazing utility […]

The post Script & Style Show: Episode 28: “Get Off My Lawn”, and Other Software Stories with Eric Brandes appeared first on David Walsh Blog.

Script & Style Show: Episode 26: Web Games with ExcaliburJS with Erik Onarheim and Kamran Ayub

In this episode:  Todd returns from a vacation to Disney and gives David some tips about surviving a family visit to Orlando’s most famous theme parks.  Erik Onarheim and Kamran Ayub join the guys to discuss HTML5 games, the Excalibur JavaScript HTML5 game library, the amazing games made with Excalibur, and more JavaScript sorcery.  Enjoy!

The post Script & Style Show: Episode 26: Web Games with ExcaliburJS with Erik Onarheim and Kamran Ayub appeared first on David Walsh Blog.

Object.fromEntries

The Object object has been buffed with useful methods over the past few years.  Object.keys, Object.values, Object.freeze, and Object.assign all address frequently desired functionality.  One of the new Object methods is fromEntries, which accepts a Map or map-like array nesting and converts it to a useful object literal! Convert Map to Object Converting a Map to a key:value […]

The post Object.fromEntries appeared first on David Walsh Blog.

Turn Bluetooth On and Off from Command Line on macOS

Bluetooth has been a revelation in wireless technology: wireless mice, headphones, streaming devices, and a variety of home and office environments.  It goes without saying that wireless peripherals are so much easier to manage than wired counterparts, especially mice, that I usually have my MacBook’s bluetooth turned on. There are times, however, that I move […]

The post Turn Bluetooth On and Off from Command Line on macOS appeared first on David Walsh Blog.

Get Up and Win

Down on my hands and knees, I crawl around, bleeding out.  I’m resigned to my fate.  A kind stranger, a new friend, rushes over to me and kneels to help, reviving me at a time that didn’t require it.  Just as I’m revived, the kind stranger says “Get up and win”.  I get up and […]

The post Get Up and Win appeared first on David Walsh Blog.