#!/bin/bash CURR_COMMIT=$(git rev-parse HEAD); CURR_VERSION=$(node -e "console.log(require('./package.json').version);"); VER_HASH=$(git rev-list -n 1 v$CURR_VERSION); # Don't want to redo version bump if [ $CURR_COMMIT == $VER_HASH ] then echo 'Already up to date' exit fi npm version patch; NEW_VERSION=$(node -e "console.log(require('./package.json').version);"); echo $NEW_VERSION; git push origin head; npm run buildprod aws s3 sync ./public s3://www.example.com --size-only --delete; # Invalidate cache aws cloudfront create-invalidation \ --distribution-id YOUR_DISTRIBUTION_ID \ --paths "/*"; What Does It Do?
If you’ve found this article, then you’ve banged your head against the problem of being on a restrictive VPN and using Docker at the same time. The culprit is usually Cisco AnyConnect or Junos Pulse. The Problem You use Docker for development. For various reasons you need to connect to a VPN, but as soon as you do, Docker stops working. There are many solutions out there, some work, others do not.
See the improved version If you’ve found this article, then you’ve banged your head against the problem of being on a restrictive VPN and using Docker at the same time. The culprit is usually Cisco AnyConnect or Junos Pulse. The Problem You use Docker for development. For various reasons you need to connect to a VPN, but as soon as you do, Docker stops working. There are many solutions out there, some work, others do not.
Maybe you work on different git projects, on business, then at home for personal projects. In the past, as a convenience, I set my
~/.gitconfig to include my name and email like the following.
This is the holy grail, the culmination of knowing there is something out there better, stronger, faster. In this blog post, I’ll outline how to set up Amazon S3, Cloudfront, and Route53 to serve your static React, Angular, or any site over HTTPS. Get ready, it’s about to get real. What am I even talking about? The new en vogue way to build sites is to use React or Angular on the front end.
The Backstory You may find yourself needing to redirect all traffic from your root domain example.com, otherwise known as the apex, to your real hostname www.example.com. Maybe you didn’t know this, but you cannot use a CNAME on your apex domain. This will bite you in the butt when you try to use your root domain example.com with Heroku’s SSL (HTTPS) service. Heroku will give you a hostname and tell you to create a CNAME to that hostname.
#Leveraging Reflux (flux) with React like a pro My latest project for a well known clothing retailer has involved writing a React based web app. It has a staggering amount of data that needs to update different parts of the app. To accomplish this, we are using React (of course) and Reflux. So you’ve heard React is the new hotness that all the cool developers are adding to their resume.
The Life of a Vagabond Software Engineer, Part 1. Constant change requires reliable tools Maybe you’re like me, you love to change things up, find new places, explore the horizons. This could be the far flung corners of the earth, or just a part of town you’ve never been. I’m a die hard explorer, but I’m also a software engineer. I need to be connected, I need power, and I need an environment that works.
A project I’m currently work on (for a very popular apparel company) is employing AngularJS for their site. I’ve created some directives to handle collecting addresses for billing and shipping. Reusable directives with their own isolate scope. To add more awesome to the mix, I’m using ngMessage to show various error messages with the form. This all works great, but the problem was showing the error messages correctly when there are two forms on the page.
While I’m not a big fan of TABS in my source code, a recent project I’m on has declared tabs are the way to go. So I needed to figure out two things. How do I tell Vim to use TABS on this project, but not on other project’s I’m on? How do I reformat some of my code to be tabs instead of spaces? Using directory specific .