GithubHelp home page GithubHelp logo

guides's Introduction

Guides

A collection of succinct guides

Collection

Contribute

I'm happy to accept requests in the issue tracker, improvements to the content, and additional guides.

License

CC0

To the extent possible under law, Sindre Sorhus has waived all copyright and related or neighboring rights to this work. This work is published from: Norway.

guides's People

Contributors

adamcbrewer avatar alrra avatar andbroby avatar camposer avatar fengzilong avatar fmarier avatar glenpike avatar hedcler avatar hserang avatar jv-k avatar kevva avatar marc22alain avatar ratijas avatar ronids avatar rugk avatar sboudrias avatar sindresorhus avatar slayug avatar sleeper avatar timothydjones avatar varemenos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

guides's Issues

No npm-cli command excuted.

After wget the sh file, no npm-cli command excuted.
Such as "yo" command shows "yo: command not found"

Im running UBUNTU 12.04 LTS

# Docker guide `service` command

Not all the Linux distributions have the service command.

For example in archlinux, this will not work:

 sudo service docker restart

But this yes:

sudo systemctl restart docker

Question about rm -fr

Hi, and thanks for the great collection.

I was wondering if there's a safety option against using 'rm -fr' ?
It seems that bash steps mentioned in "How not to rm yourself", and 'rm -i' is bypassed with this command.

"Install npm packages globally without sudo" is incompatible with nvm

nvm says:

$ nvm install 8                                                                                                                                                                                                                         
Downloading and installing node v8.9.4...                                                                                                                                                                                                                    
Downloading https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-x64.tar.xz...                                                                                                                                                                                   
######################################################################## 100,0%                                                                                                                                                                              
Computing checksum with sha256sum                                                                                                                                                                                                                            
Checksums matched!                                                                                                                                                                                                                                           
nvm is not compatible with the npm config "prefix" option: currently set to "/home/niko/.npm-packages"                                                                                                                                                       
Run `npm config delete prefix` or `nvm use --delete-prefix v8.9.4` to unset it.

Semver, patch releases and tilde notation

I'm pretty sure no one knows how the tilde works regarding dependencies and patch releases in semver. Would be nice to have a place to refer too since I need to explain this multiple times a week.

npm -g without sudo: different npm version?

I followed your guide "Install npm packages globally without sudo on OS X and Linux" on Mac which works perfectly. If I install something like $ npm i -g babel I can now use the babel command. However I tried updating npm itself with $ npm i -g npm, but I still use the old sudo-ed version of npm, not the version inside .npm-packages. Is there a nice way to use the not-sudo-installed npm version and fallback to the sudo-installed npm version, if necessary?

Lost all my npm packages

I've tried to remove sudo for installing npm_packages using https://github.com/glenpike/npm-g_nosudo.

I've used wget.

And I think it removed all my packages and reinstalled it. (I suppose).

And in the end I got this in the terminal:


....
- [email protected] node_modules/yo/node_modules/titleize
- [email protected] node_modules/yo/node_modules/update-notifier
- [email protected] node_modules/yo/node_modules/yeoman-character
- [email protected] node_modules/yo/node_modules/yeoman-doctor
- [email protected] node_modules/yo/node_modules/yeoman-environment
- [email protected] node_modules/yo/node_modules/yosay
- [email protected] node_modules/yo
sh: 74: [: npm: unexpected operator
sh: 77: [: npm: unexpected operator
npm ERR! fetch failed https://registry.npmjs.org/i/-/i-0.3.2.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 504
npm ERR! fetch failed https://registry.npmjs.org/i/-/i-0.3.2.tgz
npm WARN retry will retry, error on last attempt: Error: getaddrinfo EAI_AGAIN registry.npmjs.org:443
npm ERR! fetch failed https://registry.npmjs.org/i/-/i-0.3.2.tgz
npm ERR! Linux 3.19.0-66-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "-g" "install" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]"
npm ERR! node v5.4.1
npm ERR! npm  v3.10.5

npm ERR! fetch failed with status code 504
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/asim/npm-debug.log



Invalid choice

You may need to add the following to your ~/.bashrc / .zshrc file(s)


export NPM_PACKAGES="npm"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}"
export PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
# command
unset MANPATH  # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"



export NPM_PACKAGES="config"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}"
export PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
# command
unset MANPATH  # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"



export NPM_PACKAGES="set"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}"
export PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
# command
unset MANPATH  # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"



export NPM_PACKAGES="prefix"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}"
export PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
# command
unset MANPATH  # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"



export NPM_PACKAGES="$npmdir/.npm-packages"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}"
export PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
# command
unset MANPATH  # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"



Done - current package list:

/usr/local/lib
`-- [email protected]

Then I copied the code from export NPM_PACKAGES="npm" to export MANPATH="$NPM_PACKAGES/share/man:$(manpath)" like said in the terminal message and I pasted it in bashrc and saved.
(sudo gedit ~/.bashrc)

Then I source the bashrc

source ~/.bashrc

But still no packages are available. (gulp, yo etc)

Please help me!
I can provide more details.

OS X ulimit

the low limit of 256 open file descriptors has caused so many problems. I need a canonical place to refer to when it comes up.

Should describe what, why, and how to increase both the soft and hard limit.

Might also apply to Linux, not sure.

gruntjs/grunt#788 (comment)

`~` doesn't seem to work on every linux as path

Hey, I was running through "Install npm packages globally on Linux without sudo" on a debian machine earlier.

For some reason, exporting a path with ~ wasn't working as a path and we've had to replace it with $HOME instead.

I don't know if this is a frequent problem - but it might make sense to update to remove the tilde path notation?

Better guide for nginx set up and maintainability

There's lots of potential guides on in the wild web about setting up nginx, but they're not generic enough for maintainability across different environments and sites, and the thought of security—like proxy, load balancing, etc.

It would be nice to have guides such as

  • Setting up nginx w/ security and maintainability in mind.
  • Setting up nginx proxy for node - as a continuation for the first guide.
  • Setting up nginx with php/hhvm and probably other environments like ruby, etc

This is not working on debian 9

Debian 9.7
Node 6.16.0
NPM 3.10.10

Using the Google Click to Deploy node.js application runtime on compute engine gives us a fresh instance.

As non-root user:
wget -O- https://raw.githubusercontent.com/glenpike/npm-g_nosudo/master/npm-g-nosudo.sh | sh
source ~/.bashrc
npm install --global gatsby
gatsby --version

Expected outcome prints gatsby version

Actual result

-bash: gatsby: command not found

Using the original instructions provided here however do work.
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally

How to save a bookmarklet

How to save a bookmarklet. This is especially hard on Mobile Safari. Would be nice to have something to refer to when creating bookmarks.

  • Mobile Safari
  • Chrome for Android
  • Chrome
  • Safari
  • Firefox
  • IE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.