Edit hosts file on OSX

  05/06/2017

I had to modify local hosts file on OSX many times and it’s not just about edit and save because it requires few more things before and after.

To properly edit the hosts file on OSX, first you need to get super user access, then to remove protection from hosts file with chflags, edit hosts file and save, flush DNS cache (optional), and to set back the hosts file as protected (otherwise it will not work).

sudo su –
chflags nouchg /private/etc/hosts
sudo nano /private/etc/hosts
sudo killall -HUP mDNSResponder
chflags uchg /private/etc/hosts


Weather Forecast – Belgrade

09/08
Sun
weather - icon
Rain
27°C
10/08
Mon
weather - icon
Rain
27°C
11/08
Tue
weather - icon
Rain
29°C
12/08
Wed
weather - icon
Rain
28°C
13/08
Thu
weather - icon
Clear
29°C
14/08
Fri
weather - icon
Clear
30°C
15/08
Sat
weather - icon
Rain
32°C

Powered by OpenWeatherMap | by Phee

RSS Laracasts

  • Let's Test the Laracasts Login Modal 07/08/2020
    Often in this series, we'll use BDD to drive our applications. However, the reality is that you'll often find yourself filling in tests after the fact. With that in mind, let's work with the actual Laracasts codebase and fill in a series of end-to-end tests for the site's login modal.
    Jeffrey Way
  • Upgrading to Vue 3 06/08/2020
    Let's discuss some of the breaking changes in Vue 3 and go over the alternatives. We'll take a look at Initializing Vue, Event API changes, filters, inline templates, and v-model.
    Jeffrey Way
  • Animating the Rating Progress Bar 05/08/2020
    In this lesson, we'll make use of ProgressBar.js to make our circular rating widget animate and count up to the correct score. View the source code for this episode on GitHub.
    Jeffrey Way
  • Recaptcha Component 05/08/2020
    Next up, we'll create a useful Recaptcha Blade component that can be attached to any form. We'll begin by reviewing the basic setup instructions. Then, once we have a working example, we'll move on to extracting a Blade component that uses Alpine to initialize and render the widget. View the source code for this episode […]
    Jeffrey Way
  • Global API Changes 03/08/2020
    Let's discuss the Global API changes in Vue 3, and the ability to use instance methods as opposed to global methods in Vue 2. Further, we'll take a look at Global Tree Shaking.
    Jeffrey Way

Latest Tweets