Posts

Showing posts from October, 2017

More time coding. Less switching windows. - 1 minute read

Gulp has come through for me.  Here's a gulpfile that will save you some time toggling back and forth between your IDE and the command line: const gulp = require ( 'gulp' ); const cp = require ( 'child_process' ); gulp . task ( 'runTestsOnChange' , function runTestsOnChange () { gulp . watch ([ '**/*.js' ], function () { console . log ( 'change detected' ); try { cp . execSync ( 'jasmine' ,{ //set current directory to the child process' current working directory cwd: __dirname , //the child process will use the parent's stdin, stdout and stderr streams stdio: [ 0 , 1 , 2 ]}); } catch ( error ) { console . log ( 'Looks like your tests did not pass. No worries. Keep working!' ); } }); // gulp.watch(['**/*.js'], ['jasmine']); }); gulp . task ( 'default' ,[ 'runTestsOnChange'

Computers should do what people want them to do - 1 minute read

Sometimes I spend time (perhaps too much time) tweaking my computer.  I do this because computers should do what people want them to do.   Customization and personalization are important when it comes to the tools that we use every day. I have an Automator script that delays the startup of some applications that I commonly open.  Slack is one of these applications. I am frequently using my computer after-hours (tweaking code and researching), and I found that I got annoyed when Slack opens at those times because 1) I  don’t usually want to the interrupted at those times and 2) Slack is a leviathan application that takes an excessive amount of time to load.  So I wrote my first AppleScript to fix that problem.  I chose AppleScript because dealing with dates in bash is more difficult than it needs to be and Automator can run AppleScripts. Here it is: enjoy! --based on https://stackoverflow.com/questions/25334780/how-to-start-an-applescript-at-a-specific-time --Open Slack if