How To SSH Into Docker Container

How To SSH Into Docker Container

Problem Sometimes you need you access a container to debug or to access a command line tool available inside. Solution When the container is running you can use the exec Docker command to run a command in a running container. If you are using the Ubuntu image then this is how you SSH or bash into it a Docker container: docker exec -it ubuntu_container bash Note the --it option…

Simple CORS in AWS Lambda - Serverless Architecture

Problem Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://12gddshj.execute-api.us-east-1.amazonaws.com/dev/api/email/send. (Reason: CORS header 'Access-Control-Allow-Origin' missing). or XMLHttpRequest cannot load https://12gddshj.execute-api.us-east-1.amazonaws.com/dev/api/email/send. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access. The response had HTTP status code 400. When calling…

Drupal 8: Thoughts and Tools

About the project I just finished a fairly large project that involved using Drupal 8 as the CMS backend for a RESTFul API. Overall it was a fun project as I learned a lot more about Drupal 8 and microservices. The wait was definetely worth it and much of the rewrite had to be done if you were to ask me. Drupal 7 was and still is a great choice…

Podcasts Software Developers Should Listen To

I think we all agree that it is hard to keep up with all of the news and tools in technology. What's the hottest new Javascript framework? What's going on in other companies that affect us? We all have work, school, family, friends, and other, responsibilities which make it even harder to stop and just read all of the hottest news on Hacker News or Reddit. So how do you…

Javascript Globals and Variables

Global variables are bad in any language, Javascript is no exception. I've been reading and watching a lot of advance Javascript material lately and I learned something about Javascript global variables. The Problem You forget to declare a variable using var and if you are not using "use strict" it will declare it as a global variable if it's not being declared outside of the local scope. Example…

Lumen Micro-Framework - Useful Resources

I recently started playing around with the Lumen micro-framework. For those who don't know much about I would encourage you to check it out. It is by the developers of Laravel, another popular PHP framework. Lumen is mostly aimed towards micro-services such as a RESTful API. It makes it crazy simple to create powerful services out of the box. If you want to get started here is a list of…

Properly Redirect Files and Directories with .htaccess

The Problem A few days ago I was tasked to change the name of a directory containing PDF files linked to from many internal and external pages. Say you have a long list of links that go to important PDF files your visitors rely on. http://example.com/files/pdf/important.pdf http://example.com/files/pdf/safety.pdf http://example.com/files/pdf/instructions.pdf Now for whatever reason…