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

22/09
Sat
weather - icon
Rain
29°C
23/09
Sun
weather - icon
Clear
21°C
24/09
Mon
weather - icon
Rain
18°C
25/09
Tue
weather - icon
Clear
14°C
26/09
Wed
weather - icon
Rain
15°C
27/09
Thu
weather - icon
Clear
16°C
28/09
Fri
weather - icon
Rain
19°C

Powered by OpenWeatherMap | by Phee

RSS Laracasts

  • Mentionable Usernames with TDD 22/09/2018
    For the next version of the Laracasts forum, we offer a small feature that provides @username autocompletion when writing a new reply. To populate this list of usernames, we reference the conversation owner, every person who has left a reply, and all usernames who have been mentioned within those replies. Let me show you how […]
    Jeffrey Way
  • Many to Many Polymorphic Relations 19/09/2018
    We've finally made it to the most intimidating of Eloquent relationships: many to many polymorphic. Don't worry; it's far simpler to understand than you might initially think. In this lesson, we'll construct a standard many-to-many relationship: a user can "like" a post. Then, we'll throw a wrench into the mix. What if a user can […]
    Jeffrey Way
  • Smaller Additions 18/09/2018
    Let's review a few smaller - yet still important - updates to Laravel 5.7. You'll learn about a new base directory for your JavaScript and CSS assets, callable action url generation, and guest authorizations.
    Jeffrey Way
  • Improved Artisan Command Testing 14/09/2018
    Laravel 5.7 ships with improved support for testing your Artisan commands. You can now leverage the helpful expectsQuestion() and expectsOutput() methods to ensure that your commands function exactly as expected.
    Jeffrey Way
  • Count Up 13/09/2018
    Let's review another real-life example. We need to construct a Vue component that counts from 0 to a given number very quickly. However, this counting should not begin until the element is within the user's viewport. View the source code for this episode on GitHub.
    Jeffrey Way

Contact