September 13, 2018

Web Development

  • How to Install Docker on Windows 10 Home
    by Michael Wanyoike on October 22, 2019 at 5:36 am

    If you've ever tried to install Docker for Windows, you've probably came to realize that the installer won't run on Windows 10 Home. Only Windows Pro, Enterprise or Education support Docker. Upgrading your Windows license is pricey, and also pointless, since you can still run Linux Containers on Windows without relying on Hyper-V technology, a requirement for Docker for Windows. If you plan on running Windows Containers, you'll need a specific version and build of Windows Server. Check out the Windows container version compatibility matrix for details. 99.999% of the time, you only need a Linux Container, since it supports software built using open-source and .NET technologies. In addition, Linux Containers can run on any distro and on popular CPU architectures, including x86_64, ARM and IBM. In this tutorial, I'll show you how to quickly setup a Linux VM on Windows Home running Docker Engine with the help of Docker Machine. Here's a list of software you'll need to build and run Docker containers: Docker Machine: a CLI tool for installing Docker Engine on virtual hosts Docker Engine: runs on top of the Linux Kernel; used for building and running containers Docker Client: a CLI tool for issuing commands to Docker Engine via REST API Docker Compose: a tool for defining and running multi-container applications I'll show how to perform the installation in the following environments: On Windows using Git Bash On Windows Subsystem for Linux 2 (running Ubuntu 18.04) First, allow me to explain how the Docker installation will work on Windows. How it Works As you probably know, Docker requires a Linux kernel to run Linux Containers. For this to work on Windows, you'll need to set up a Linux virtual machine to run as guest in Windows 10 Home. Setting up the Linux VM can be done manually. The easiest way is to use Docker Machine to do this work for you by running a single command. This Docker Linux VM can either run on your local system or on a remote server. Docker client will use SSH to communicate with Docker Engine. Whenever you create and run images, the actual process will happen within the VM, not on your host (Windows). Let's dive into the next section to set up the environment needed to install Docker. Initial Setup You may or may not have the following applications installed on your system. I'll assume you don't. If you do, make sure to upgrade to the latest versions. I'm also assuming you're running the latest stable version of Windows. At the time of writing, I'm using Windows 10 Home version 1903. Let's start installing the following: Install Git Bash for Windows. This will be our primary terminal for running Docker commands. Install Chocolatey, a package manager for Windows. It will make the work of installing the rest of the programs easier. Install VirtualBox and its extension. Alternatively, If you have finished installing Chocolatey, you can simply execute this command inside an elevated PowerShell terminal: C:\ choco install virtualbox If you'd like to try running Docker inside the WSL2 environment, you'll need to set up WSL2 first. You can follow this tutorial for step-by-step instructions. Docker Engine Setup Installing Docker Engine is quite simple. First we need to install Docker Machine. Install Docker Machine by following instructions on this page. Alternatively, you can execute this command inside an elevated PowerShell terminal: C:\ choco install docker-machine Using Git Bash terminal, use Docker Machine to install Docker Engine. This will download a Linux image containing the Docker Engine and have it run as a VM using VirtualBox. Simply execute the following command: $ docker-machine create --driver virtualbox default Next, we need to configure which ports are exposed when running Docker containers. Doing this will allow us to access our applications via localhost<:port>. Feel free to add as many as you want. To do this, you'll need to launch Oracle VM VirtualBox from your start menu. Select default VM on the side menu. Next click on Settings > Network > Adapter 1 > Port Forwarding. You should find the ssh forwarding port already set up for you. You can add more like so: Next, we need to allow Docker to mount volumes located on your hard drive. By default, you can only mount from the C://Users/ directory. To add a different path, simply go to Oracle VM VirtualBox GUI. Select default VM and go to Settings > Shared Folders. Add a new one by clicking the plus symbol. Enter the fields like so. If there's an option called Permanent, enable it. To get rid of the invalid settings error as seen in the above screenshot, simply increase Video Memory under the Display tab in the settings option. Video memory is not important in this case, as we'll run the VM in headless mode. To start the Linux VM, simply execute this command in Git Bash. The Linux VM will launch. Give it some time for the boot process to complete. It shouldn't take more than a minute. You'll need to do this every time you boot your host OS: $ docker-machine start vbox Next, we need to set up our Docker environment variables. This is to allow the Docker client and Docker Compose to communicate with the Docker Engine running in the Linux VM, default. You can do this by executing the commands in Git Bash: # Print out docker machine instance settings $ docker-machine env default # Set environment variables using Linux 'export' command $ eval $(docker-machine env default --shell linux) You'll need to set the environment variables every time you start a new Git Bash terminal. If you'd like to avoid this, you can copy eval output and save it in your .bashrc file. It should look something like this: export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://" export DOCKER_CERT_PATH="C:\Users\Michael Wanyoike\.docker\machine\machines\default" export DOCKER_MACHINE_NAME="default" export COMPOSE_CONVERT_WINDOWS_PATHS="true" IMPORTANT: for the DOCKER_CERT_PATH, you'll need to change the Linux file path to a Windows path format. Also take note that there's a chance the IP address assigned might be different from the one you saved every time you start the default VM. In the next section, we'll install Docker Client and Docker Compose. The post How to Install Docker on Windows 10 Home appeared first on SitePoint.

  • What are some good resources to get better at CSS?
    by /u/YAYYYYYYYYY on October 22, 2019 at 3:18 am

    I’m a python guy and I hate CSS. Maybe I just don’t understand it. I enjoy making web apps right up until the point where I need to design it, and then I give up. Wherever I think I’m placing something, it ends up somewhere completely different. Float: right is a nightmare, and any time I try to set a color to a tag nothing ever changes. I feel like I have to guess and check 10 different tags until I find the right one. Link me your favorite CSS design tricks/videos and I’ll be eternally grateful. submitted by /u/YAYYYYYYYYY [link] [comments

  • Project Help
    by /u/Fireman45 on October 22, 2019 at 3:12 am

    I need help with a project that would require some small guidelines. If anyone can help I would pay well. It includes creating a script that generates and enters a raffle. Thanks. submitted by /u/Fireman45 [link] [comments

  • Good approach to set up a static website project?
    by /u/xuan9230 on October 22, 2019 at 2:55 am

    I'm a React+Node developer trying to build a simple, heavily front-end oriented personal website. Think of it has a landing page which combines several html/css/js pieces from Now I'm faced with two problems: What's a good way to set up a project like this? Stuff like manually creating index.html, setting up SCSS, babel etc takes quite some time. Since it's a simple website without much logic I guess it's a bad idea to use create-react-app? How to handle conflicts? Say I found two beautiful codepen pieces and want to put in one page, but simply copy & paste won't work as there are clashes of class names, ids, global css styles etc. Is there a concept like es modules, where I can import two html files into a parent html file? Thanks for any help or recommendation of any engine/template! submitted by /u/xuan9230 [link] [comments

  • Dissecting A Dweet: Mini Black Hole
    by /u/fagnerbrack on October 22, 2019 at 2:14 am

    submitted by /u/fagnerbrack [link] [comments

  • Things All Developers Should Learn In College
    by /u/fagnerbrack on October 22, 2019 at 2:13 am

    submitted by /u/fagnerbrack [link] [comments

  • Question about React and Stripe
    by /u/namehimjawnathan on October 22, 2019 at 1:45 am

    I am making a fully-featured web app using React on the frontend and Firebase as the backend. When I am implementing Stripe, does this only need to be implemented on the client side and stripe takes care of the rest? What if I want to set up recurring payments? submitted by /u/namehimjawnathan [link] [comments

  • What ever happened to the prodigy programmer who “dreams in code” ?
    by /u/JavaScriptWhore on October 22, 2019 at 1:24 am

    I recall watching a YouTube video on this kid a while back and was wondering what he’s been up to these days. Did he make it? submitted by /u/JavaScriptWhore [link] [comments

    by /u/pereVush on October 22, 2019 at 1:18 am

    Hey guys, I have two the same async functions in JS. The first code is from Brad Traversy (vuex crash course) The second code is mine. Can someone give me a review about these two code because I have a doubt on own code although it's working. first code import axios from 'axios'; //state const state = { articles: [] }; //getters const getters = { allArticles: state => state.articles } //mutations const mutations = { RETRIEVE_TODOS: (state, articles) => (state.articles = articles), }; //actions const actions = { //retrieve articles in server async loadArticles({ commit }) { const response = await axios.get('http://localhost:9000/article/articles'); commit('RETRIEVE_TODOS',; } }; second code import axios from 'axios'; //state const state = { details: [], results: [] }; //getters const getters = { personDetails: state => state.details }; //mutations const mutations = { RETRIEVE_INFO: (state, details) => (state.details = details) }; //actions const actions = { async loadPersonDetails({ commit }) { await axios.get('http://localhost:9000/article/articles') .then(response => (this.results = .catch(error => console.log(error)); commit('RETRIEVE_INFO', this.results) } }; submitted by /u/pereVush [link] [comments

  • Resume questions for a front end dev
    by /u/Jayboii478 on October 22, 2019 at 1:05 am

    If I'm using Google docs to make my resume, should I include live links to live demos of my projects, my portfolio, github etc.. Or should I just write out the URL in plain text? Any tips for making a front end dev resume? Should it look fancy, or is the Google docs basic formats fine? Thanks! submitted by /u/Jayboii478 [link] [comments

  • How does a freelance web developer acquire content for a client?
    by /u/symmetricon on October 22, 2019 at 12:28 am

    Aside from graphic design, how do freelance web developers go about acquiring/creating content(text and images) for clients? Is it typical to have clients come up with the content, or is that on the developer? submitted by /u/symmetricon [link] [comments

  • How to choose a font for a project
    on October 21, 2019 at 11:20 pm

  • Web Design Trends: That 90s Look is Coming Back
    on October 21, 2019 at 11:11 pm

  • One click ADA compliance tool, does anyone have experience with similar solutions? Are they BS?
    by /u/bmp1997 on October 21, 2019 at 10:54 pm

    submitted by /u/bmp1997 [link] [comments

  • Facebook's new web interface is rolling out for some, with dark mode in tow
    on October 21, 2019 at 10:08 pm

  • How Figma’s multiplayer technology works
    on October 21, 2019 at 9:28 pm

  • Wordpress... I hate you, that is all
    by /u/bloomt1990 on October 21, 2019 at 9:20 pm

    Working with wordpress is like blending a brick, you could theoretically do it but the time, effort and cost would be ridiculous. Maybe I Just need more coffee... Or maybe wordpress was build to piss me off. submitted by /u/bloomt1990 [link] [comments

  • MySQL vs mariadb difference as of 2019
    by /u/Mittalmailbox on October 21, 2019 at 9:05 pm

    Mariadb was supposed to be better than MySQL. It is still true or differeces are negligible. submitted by /u/Mittalmailbox [link] [comments

  • Should you build a native app or a web app?
    by /u/caspii2 on October 21, 2019 at 8:22 pm

    submitted by /u/caspii2 [link] [comments

  • How to Create Motion Hover Effects with Image Distortions using Three.js
    on October 21, 2019 at 8:17 pm

  • Isobuild - The first exclusive isometric editor
    on October 21, 2019 at 8:11 pm

  • 10 Coded Animated Scenes for Halloween Design Inspiration
    on October 21, 2019 at 7:23 pm

  • Facebook isn’t free speech, it’s algorithmic amplification optimized for outrage
    on October 21, 2019 at 7:09 pm

  • Has anyone tried out those new LinkedIn quizzes?
    by /u/Rickygoacher on October 21, 2019 at 6:38 pm

    I just attempted two quizzes, the HTML5 quiz and the CSS one. The CSS one crashed on me and now I can’t retake it for 3 months. I completed the HTML quiz, but a lot of the questions were just really obscure and the time given to answer these questions was just stupid, it gives you barely enough time to read the questions and answers. What does everyone else think of these quizzes? And should I even bother attempting any of the others? submitted by /u/Rickygoacher [link] [comments

  • Figma meets mockups
    on October 21, 2019 at 6:16 pm


WP to LinkedIn Auto Publish Powered By :