Oh My Zsh - how to use GitHub plugin? - plugins

Just enabled github plugin in .zshrc:
plugins=(… guthub …)
After this autocomplete works fine, when I press tab I see:
But then, if, I try to run actual command, e.g.
github create test-repo
I'm getting
zsh: command not found: github
Until now I used simple plugins only with aliases and I'm sure that I'm missing something here :)

The github plugin contains this comment:
# in order to make this work, you will need to have the github gem installed
# http://github.com/defunkt/github-gem
So to use it you'll need to install Ruby, then gem install github.

Related

cli: stylelint --help : command not found (mac)

I've been using stylelint-gulp for some time now without issue.
I have stylelint loaded as a npm devDependancy(ie not global, as I dont want it to be global) in my project, and following the instructions I should have the CLI available as well.
however stylelint --help returns "command not found"
I have other modules installed like eslint, and the cli works just fine.
node: v12.11.1
npm: 6.11.3
I also have nvm installed so I've tried switching back to npm --lts but it's still not working. Btw, this is on osx 10.13.6 if it matters.
any advice?
As you don't have stylelint installed globally you won't have the stylelint command available globally.
Similar to noted in the comment above, the best way to use the stylelint command when you don't have it installed globally is to access it via a repo where you do have it installed:
./node_modules/.bin/stylelint "**/*.css"
The short answer:
With any locally installed npm package (ie as a project's devDependancy), you should not expect to be able to run the package's CLI as follows <package_name> --help. You will need to include the full path to the module in the .node_moduels/ directory, just as #netweb has shown in his answer:
./node_modules/.bin/stylelint --help
IMHO Stylelint's documentation page is a tad confusing in this regard, which is why I asked the question.
The longer answer:
To be able to run stylelint --help or any other npm CLI, you would have to† install the package globally, ie: <package_name> -global. In that process, a symlink is created so the <package_name> keyword could be invoked in any directory on the system.
However, there is a category of tools (for example linters) where its usually considered bad practice to install them globally. This is because different projects will likely have conflicting requirements, in which case, having all these tools globally installed quickly becomes problematic. It's best to have these tools installed at the project level as a devDependancy like so: npm install <package_name> --save-dev.
If you are setting up an npm scripts or Continuous Integration systems then you would invoke these tools' CLI by including the path to the local install: ./node_modules/.bin/stylelint "**/*.css"
However, in the terminal, writing the fill path each and every time you want to invoke a tool is painful, so instead, you can use [npx][4] to invoke the locally installed module:
npx stylelint --help
† npm-link, also symlinks your local package as if it was a globally installed. However, except for some specific scenarios, it's very unlikely you want to make globally available a local devDependancy.

I want to know how to use Github in open source

I am a programming starter to try github for the first time.
https://github.com/froala/design-blocks
I completed the clone as described in the main link.
I have also completed the npm installation as described in the text and have successfully run it.
But if i simply want to use source code, do i not need to install the module using npm?
Why do I install the module using npm?..
How do I use the packages I installed using npm?
Even if I did a search on Google, there was no post for beginners like me.
I really appreciate your advice.

Some beginner questions about Centreon

I am new to Centreon and I have a few questions I need to figure out. I have these services:
I just want to know how can I have these services like this.
2nd question
on Github, I find that the plugin is end with .pm not .pl, which is I wonder why, and how to use the plugin on Github, because I already put it in on a folder on Centreon and restart it on the poller, but I do not see the plugin I downloaded.
3rd question
For interfaces:
--plugin=os::linux::snmp::plugin --mode=interfaces --add-status --add-traffic
For services (if it's windows):
--plugin=os::windows::snmp::plugin
Is this just command or I have to modify it on a plugin ?
You must have create a new host and link to this host an host template. This host template is linked to services and this why you have services created. Do not hesitate to check this documentation
To use our centreon plugin you have two different way to do:
Clone our GitHub repository Here, and manage your script file by file use the centreon_plugins.pl to call the .pm file through the --plugin option, through the following command line you can download the repo:
git clone https://github.com/centreon/centreon-plugins.git
Use the Centreon RPM packages, who they correspond to the GitHub script, but all build per kind of devices (one .pl script per devices). You can install them with the following command line:
yum install --nogpgcheck centreon-plugins\*
By default all nagios plugins are stored in "/usr/lib64/nagios/plugins/" and the centreon plugins are stored in "/usr/lib/centreon/plugins/"
'--plugin' option is related to a command and it just indicate the plugin that will be used, you don't need to modify any plugin just the command unless you want to change something inside the plugin.

Golang auto completion nsf package

I have installed sublime and go.
Tried the autocompletion feature offered by https://github.com/nsf/gocode.
It works perfectly for standard packages.
But not working for external packages like the ones fetched from github.
Any help on this appreciated. Thanks.
It will only work if you build and install those external packages.
if you just go get their sources, the completion won't work, even said sources are in the GOPATH/src/....
Those packages need to be at least compiled (GOPATH/pkg).
As mentioned in "How does Go update third-party packages?", a go get -u all can help.
For go autocomplete to work (Atom Editor, Sublime, even vim with autocomplete)
Your package must be placed in the go path. (this can be automatically done if the project is on github and you use the get tool)
go get -u github.com/username/packageName
you must build your package
go build $GOPATH/pathToYourProject...
you must install your package
go install $GOPATH/pathToYourProject...

plugman not working on windows? adding core features to phonegap 3.0 app

I have followed theese instructions.
installed plugman (command didnt work, so I added this C:\Users\XXX\AppData\Roaming\npm\node_modules\cordova\node_modules.bin to PATH to make 'plugman' command work in cmd).
after getting plugman command to work (it's help was working in console), Ive entered the camera api command:
plugman --platform android --project c:/path/to/app --plugin https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
the output was:
undefined is not a function
what did I do wrong?
I've found an answer on phonegap google group.
To make this work, you need to install git console and then download the plugin with command:
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
The is a bug that was recently submitted and fixed.
You basically need Git installed, yes, but for plugman to work in "cmd.exe" (or any non-Git CLI) you need to have Git/bin in your system path.
Taken from my blog (http://atomicstructure.net/blog/2013/07/phonegap-3-0-troubles):
Click Start, right-click Computer then select Properties. Click Advanced System Settings (top-left) then Environment Variables in the Advanced tab.
Under System variables find the variable called Path and edit that to include the full system path to where Git is installed. So for example, mine now reads:
%SystemRoot%\system32;%SystemRoot%; [snip] ;C:\Program Files (x86)\Git\bin
With the all important bit highlighted in bold. As with Ant and Android Development Tools, you'll need to include the /bin subfolder, too.