As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| // haversin(θ) function | |
| func hsin(theta float64) float64 { | |
| return math.Pow(math.Sin(theta/2), 2) | |
| } | |
| // Distance function returns the distance (in meters) between two points of | |
| // a given longitude and latitude relatively accurately (using a spherical | |
| // approximation of the Earth) through the Haversin Distance Formula for | |
| // great arc distance on a sphere with accuracy for small distances | |
| // |
Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage
( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs),
but on a production release app downloaded from an app store you're most likely to see:
run-as: Package 'com.mypackage' is not debuggable
| # use the latest ubuntu environment (18.04) available on travis | |
| dist: bionic | |
| language: go | |
| # You don't need to test on very old versions of the Go compiler. It's the user's | |
| # responsibility to keep their compiler up to date. | |
| go: | |
| - 1.16.x |