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

28/10
Wed
weather - icon
Clouds
16°C
29/10
Thu
weather - icon
Rain
15°C
30/10
Fri
weather - icon
Rain
13°C
31/10
Sat
weather - icon
Rain
14°C
01/11
Sun
weather - icon
Clear
10°C
02/11
Mon
weather - icon
Clear
12°C
03/11
Tue
weather - icon
Clear
11°C

Powered by OpenWeatherMap | by Phee

RSS Laracasts

  • Livewire File Uploads to Amazon S3 27/10/2020
    Many multi-tenant apps require image uploads, and may need to store those files in Amazon S3. Let’s create an Amazon S3 bucket from scratch and get it connected to our app. Then, we'll leverage the powerful and simple file uploading functionality that Livewire provides.
    Jeffrey Way
  • Upgrade the IGDB API to v4 23/10/2020
    This series used version 3 of the IGDB API; however, since publishing, version 4 is now available. In this supplementary episode, we'll review the necessary upgrade steps.
    Jeffrey Way
  • Use Livewire With Blade Components 23/10/2020
    It’s usually a good idea to extract reusable bits of code into Blade components. Let's set aside some time to extract a Livewire "text" input component and use whereStartsWith to get our wire:model attribute even when it includes a modifier.
    Jeffrey Way
  • Beware the Flying V Complication 22/10/2020
    A useful technique when refactoring code is to focus on confusing conditionals, long lines, and the "Flying V". In this episode, we'll review each of these as we spike out a fun, small example from scratch, and then proceed to refactor it line by line.
    Jeffrey Way
  • Telescope as a Monitoring App 20/10/2020
    Next, let's review how we might use Telescope to monitor an application in production.
    Jeffrey Way

Latest Tweets

  • Plasim se da bi vecina onih koji sada pljuju Srdjana Todorovica zbog raspalog pinka istog trenutka prihvatili posao… https://t.co/BlKZIyHoNM
    4 weeks ago
  • Jel neko prenosi jebenu Ligu Evrope?
    3 months ago
  • RT @nomen_est_omen7: HITNO POTREBNA KRV !!! Sveštenik Rajko Srdić je imao veliki moždani udar,u septičkom je stanju,dobio je koronu i na re…
    3 months ago