Posts
Moving To Containers in Meteor (ES6) For React
The current way to connect Meteor into your React App is to use ES6 based components. Meteor has a function called “createContainer” that will send Meteor data into your React component as props instead of “this.data” access. This can make it a bit more complicated if you need to change your subscriptions based on React’s state, but we will talk about the new pattern you will need to use. This is a better pattern long term as you can switch out the top level data injection and re-use all your display logic (say you want to swap out Meteor down the road, or use Redux).
Posts
Re-factoring from React CreateClass to Native ES6 Classes
For the past few weeks I have been refactoring a client’s app to move from the React.CreateClass() format to the new and shiny ES6 class based format. We also re-factored Meteor from a mixin to the new createContainer component format. While we are at it, let’s demonstrate the functional based components for a child that only uses props (so not state). Functional components make the code much cleaner as you don’t need constructors for just display logic.
Posts
Backup your servers automatically to Amazon AWS S3
This post will explain how I backup mine and my clients Linux servers to Amazon’s S3 file storage service via bash shell scripts.
It’s cheap, quick, and it takes care of off-site backups. I prefer to use a different provider than my hosting company in case of major system disruption. I hope everyone has great documentation on how to stand up a new server! With this design, it gives you ultimate control over how many backups you want, and how long to keep them.
Posts
MacOS locations for programs that start on boot – Daemons and Launchctl
MacOS has a few locations that start programs up on boot (called agents and daemons in macOS). If your Mac seems slower, this might be a cause, a bunch of background services running for programs you don’t use often enough. There are also programs that install themselves everywhere and just deleting the application will not remove them. We will walk through all the directories that an application can hide in.
Posts
Use an iPad for an external travel monitor – MacBook and PC
I like to travel, so sometimes on the road programming can be a chore without my large monitor. There is a useful solution and that is to use an iPad as an external monitor. It actually works quite well! What’s nice too is you can use the tablet for most of your normal tasks, and bust out the laptop/tablet combo when you need more real estate (and are compiling things).
Posts
Cisco ACI – How to connect to the APIC API and get data
In this guide I will show Python code that will use HTTP GET requests on the Cisco APIC / ACI system and pull data. This will let you get information from the APIC, and display it in a better way. There are many things missing from the GUI (mostly on the reporting front) that you can create with some basic Python scripting.
There are two formatting types to get data in and out of the APIC: JSON and XML.
Posts
Make a Cisco ISO Bootable (non-bootable)
I am going to run through a quick procedure to make the downloadable Cisco CUCM ISO images bootable. When you download them they are non-bootable for some reason. Use this at your own risk, and you must have a support contract to use any Cisco products. I am not liable for anything you do or mess up!
Cisco is nice enough to include the boot options and ISOLINUX files and configuration necessary to boot it.
Posts
WordPress automatic updates – the hassle free way
I have quite a few wordpress sites under management, and updating the plugins and themes can get quite tedious. This script will update all of them automatically (you will need SSH and CRON access for this) to whatever time-frame you set it to. The trick is to use “wp-cli” which is a command line toolset for WordPress that lets you do just about anything (you can even reset admin passwords so be careful who has access to this stuff).
Posts
React in a WordPress page
If you are creating things with ReactJS, it’s sometimes nice to use it in WordPress. I will describe how to use it in a page, but this should also work for just a post.
You can do this pretty easily with a couple plugins:
“Scripts N Styles” - this plugin will allow you to add JavaScript to your Page.
“Per Page Add to Head” - this will allow you to add the necessary JavaScript libraries to the head portion of the WordPress page.
Posts
Connect your Meteor App with MailChimp
Does your application have users? I hope so! Keep them around and active.
The best way to get users engaged, and keep them coming back is to use email marketing. You can create a sign-up workflow, move users to different workflows based on what they are doing in your app, and re-engage users that haven’t logged in for X months/weeks. Its very easy, so here is some code that connects to the MailChimp API and lets you add users to Lists.