Skip to content

Instantly share code, notes, and snippets.

@luismayta
Created October 2, 2020 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luismayta/215a4497c218022feb591c28de987c2f to your computer and use it in GitHub Desktop.
Save luismayta/215a4497c218022feb591c28de987c2f to your computer and use it in GitHub Desktop.

How To Contribute

Contributions to core-front are welcome.

Configure dnsmasq

osx

Install

brew install dnsmasq

Configure

vim $(brew --prefix)/etc/dnsmasq.conf

and added content:

log-dhcp
log-queries
no-resolv
resolv-file=/etc/resolv.dnsmasq.conf
address=/.test/127.0.0.1
listen-address=127.0.0.1
strict-order

implement settings for resolv.dnsamsq:

sudo vim /etc/resolv.dnsmasq.conf

and added content:

# Google:
nameserver 8.8.8.8
nameserver 8.8.4.4

# cloudflare:
nameserver 1.1.1.1
nameserver 1.0.0.1

make path and files for resolver:

sudo mkdir -p /etc/resolver
sudo vim /etc/resolver/test

and added content:

nameserver 127.0.0.1
domain test
search_order 1

and add dns servers:

networksetup -setdnsservers Wi-fi 127.0.0.1 8.8.8.8 8.8.4.4 1.1.1.1 1.0.0.1

run service

sudo brew services start dnsmasq

test service

ping equipindustry.test

linux

Install

sudo pacman -S dnsmasq

Configure

sudo vim /etc/dnsmasq.conf

and added content:

no-resolv
listen-address=127.0.0.1
resolv-file=/etc/resolv.dnsmasq.conf
address=/.test/127.0.0.1

implement settings for resolv.dnsamsq:

sudo vim /etc/resolv.dnsmasq.conf

and added content:

# Google:
nameserver 8.8.8.8
nameserver 8.8.4.4

# cloudflare:
nameserver 1.1.1.1
nameserver 1.0.0.1

and dns local to:

sudo vim /etc/resolv.conf

and added content:

nameserver 127.0.0.1

# Google:
nameserver 8.8.8.8
nameserver 8.8.4.4

# cloudflare:
nameserver 1.1.1.1
nameserver 1.0.0.1

run service

sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved

sudo systemctl start dnsmasq
sudo systemctl enable dnsmasq

test service

ping equipindustry.test

Getting Started

Commits

Follow semantic commits to make git log a little easier to follow.

chore

something just needs to happen, e.g. versioning

docs

documentation pages in _docs/ or docstrings

feat

new code in src/

fix

code improvement in src/

refactor

code movement in src/

style

aesthetic changes

test

test case modifications in test/

Examples commit messages:

  • chore: 0.1.0 (CF-698)
  • docs: Add configuration setting (CF-698)
  • feat: Create Lambda function (CF-698)
  • fix: Retry upload on failure (CF-698)
  • refactor: Extract duplicate code (CF-698)
  • style: isort, YAPF (CF-698)
  • test: Coverage around add permissions (CF-698)

Branches

Use slash convention with the same leaders as commits, e.g.:

  • (prefix-task)

Documentation

  • Use reStructuredText for docstrings and documentation
  • For docstrings, follow napoleon:example_google
  • For documentation pages, follow the strong guidelines from Python with

    pythondev:documenting

Note

  • Use .rst for regular pages

* Use .rest for pages included using .. include:: file.rest (fixes a Sphinx issue that thinks references are duplicated)

Testing

Run all unit tests

make test.all

Run unit tests specified

make test run={path}

Code Submission

Code Improvement

  1. See if an Issue exists
    • Comment with any added information to help the discussion
  2. Create an Issue if needed

Code Submission

  1. See if a Pull Request exists
    • Add some comments or review the code to help it along
    • Don't be afraid to comment when logic needs clarification
  2. Create a Fork and open a Pull Request if needed

Code Review

  • Anyone can review code
  • Any Pull Request should be closed or merged within a week

Code Acceptance

Try to keep history as linear as possible using a rebase merge strategy.

  1. One thumb up at minimum, two preferred
  2. Request submitter to rebase and resolve all conflicts

    # Update `develop`
    git checkout develop
    git pull origin develop
    
    # Update `CF-698` Branch
    git flow feature start CF-698
    git rebase develop
    
    # Update remote Branch and Pull Request
    git push -f
  3. Merge the new feature

    # Merge `CF-698` into `develop`
    git checkout develop
    git merge --ff-only feature/CF-698
    git push
  4. Delete merged Branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment