.gitignore node_modules/ not working for fd and ripgrep [closed] - fzf

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I'm trying to setup fzf.vim for vim on windows 10.
You can use an alternative find command like ripgrep or fd which is supposed to respect .gitignore.
My .gitignore file has this line, which is working fine for git commits, etc.:
node_modules/
My dir structure is
/working directory
.gitignore file
.git dir
/node_modules dir
When I run
fd --type f
or
rg --files
It lists all files in node_modules.
I feel like this may be a windows problem.
How can I get these programs to use .gitignore to ignore node_modules?

Turns out, I was using a project where the git repo had not yet been initialized. So I had a .gitignore, but did not have a .git folder. And by default ripgrep needs it to be an actual git repository to utilize the .gitiginore folder. My solution was to use the following flag -
--no-require-git
More info here

Related

Anguar node_modules: how to cleanup? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
Having an Angular project I have a node_modules directory in my project dir.
That is pretty full with all the files of the modules I use.
I like to periodically save the project folder for backup. Doing this takes a bit of time because of node_modules.
Is it a bad idea to remove nodes_modules before backup and then after doing more coding rebuild it with
npm install
?
Or maybe theres a better way to have smaller backups?
EDIT
I do git and also this directory-backup. My question is regarding the directory-backup only.
Your package.json file act as a blue print for your required node modules with versions of every node module being used in the project, hence keeping a back up of node_module doesn't make sense, as you can get it back with a npm install on your project anytime
If you are using Git, you can ignore node_modules by adding the following in .gitignore file
# dependencies
/node_modules
node_modules and package-lock.json should not be backed up it should be installed when used as all data is present in package.json
Please use a version control system shuch as git instead of manual backups
Check this link for better understanding
https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control

general question about node_modules and security

Can't find anything on this online and might be a non-issue, but I figured I'd ask here to make sure.
We run the Wordfence security plugin on a bunch of WordPress sites and have recently seen this "critical issue" reported:
Filename: wp-content/themes/theme-name/node_modules/webpack-assets-manifest/test/fixtures/client.js
File Type: Not a core, theme, or plugin file from wordpress.org.
Details: This file appears to be installed or modified by a hacker to perform malicious activity.
If you know about this file you can choose to ignore it to exclude it from future scans.
The matched text in this file is: require('./Ginger.jpg');
The issue type is: Backdoor:PHP/req_img.3645
Description: A backdoor known as req_img
Now first of all that doesn't look like a backdoor to me, especially since node_modules contents aren't executed unless I run npm (or yarn), as far as I understand. Is this more serious than I think?
Secondly, when running npm/yarn on the server, the node_modules folder has chmod 775 (drwxrwxr-x) by default. Is it okay to leave it like that or should we take any action?

Nothing happens when I try to send files / folders to Compressed (zipped) folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 months ago.
The community reviewed whether to reopen this question 7 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
For a while now, I've been unable to send files or folders to Zipped folder from windows explorer. The option is there, but when I click on it, nothing happens.
It seems others have had similar problems, but in their cases, the option has been greyed out, or another program has taken over as the default .zip program.
If I type "regsvr32 %windir%/system32/zipfldr.dll" into a run command, I get the following error:
_______________________________
[Window Title]
RegSvr32
[Content]
The module "C:\WINDOWS/system32/zipfldr.dll" was loaded but the entry-point DllRegisterServer was not found.
Make sure that "C:\WINDOWS/system32/zipfldr.dll" is a valid DLL or OCX file and then try again.
[OK]
_______________________________
Very annoying, I'm not sure what is causing this.
I ran into this issue as well. However my fix was much easier. My file names and paths were too long to be zipped. There was no warning.
I resolved it by copy-pasting the directory to another with a shorter path.
e.g. from /this/path/is/way/too/ooo/ooo/oo/long to /home/Desktop
I've copied the comments from this link mentioned earlier - http://david-homer.blogspot.com.br/2014/06/when-using-send-to-compressed-zipped.html
When using the "Send to compressed (zipped) folder" context menu item nothing happens
I've recently had a problem when using the "Send to
compressed (zipped) folder" context menu item nothing happens on
Windows 8.1.
Looking further into this I found that it worked most folders just not
the one I wanted to ZIP.
After a while I realised that I had a Visual Studio project source
code in this folder that had that annoying deep object folder problem and it
seems that when you click "Send to compressed (zipped) folder" if
there is an exceptionally deep directory structure in the folder you
are zipping, the compression may fail but show no error.
I use the following tried and tested RoboCopy method for removing
these broken directories with exceptionally deep paths that you can't
delete with Windows Explorer.
#echo off
cls
mkdir emptyfolder
robocopy emptyfolder "path\to\obj" /MIR
rmdir emptyfolder
rmdir "path\to\obj"
pause
Why not check out our User Provisioning Tool on our web site
I can see that this could be a potential problem, however at the moment this is working fine again as far as I can see - if I have the issue again I guess I'll have to check out the file structure, maybe that could be the issue.
I had the same problem, when clicked on send to compressed file nothing happened, then i found out that when you have a deep folder structure, windows fails to zip and doesn't show any errors. As it is explained here: http://david-homer.blogspot.com.br/2014/06/when-using-send-to-compressed-zipped.html
Check whether your file does not have the extension. Remember that Windows explorer does not allow creating folders beginning with dot, even though the underlying system can handle them.
I realise that I'm quite late to answering this question but I was having the same problem when trying to zip a folder and it seemed that nothing happened and no error was shown.
I right clicked and copied the folder, then pasted it to the same directory, during the copy a dialog told me there were several files in the folder that where too long to be copied, so I clicked skip. Then right clicked the copied folder and sent to zip and it worked.
I know it is way too late but it might help someone. Does your folder have other sub-folders inside it? In my case, I tried zipping the folders which have sub-folders and it did not work (no response just like in your case). Try to zip the folders which have files only and no any sub folders inside.
I too ran into this problem while I was attempting to zip Android Studio Source code from 10 different projects. Initially having a overly deep structure seemed to be the case, and for me too Windows did not show an error initially.
So I did some more file digging and I found that this error usually occurs if you have an empty folder somewhere in your file structure of the file you are trying to zip. Each level down I was able to find the folder containing the mystery folder and each time the windows error would appear showing me the error saying that it could not zip an empty folder!
I went down the Rabbit hole and added a simple READ_ME.*txt file to each empty folder and viola!
I am using Windows 10 updated version on 10.2018.
Hope this helps someone!
Also way late, but maybe this will help others:
I had this problem, but could not find this mysterious folder, or deep directory, in fact, one of the folders that wouldn't zip had just one Word document in it.
What I did was to find a folder that would zip (or create one) and then copy the folder that wouldn't zip into it.
Worked like a charm!
I worked around the problem by using 7-Zip instead.

Latest (master/snapshot) Spark documentation - either online or run locally [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there a location where the latest spark documentation has been built and is available?
For example the 1.3.0 release candidate branch was cut five days ago but it is not available from the apache site - the newest is the already-in-production 1.2.0.
Even better would be the output of an Amplab Jenkins build. But maybe someone just publishes it regularly on a publicly accessible location?
Alternatively what is the procedure to generate html from the Spark markdown's? I can easily put up a local webserver to serve them.
Nightly publication of documentation snapshots and build artifacts is on the Spark roadmap; see https://issues.apache.org/jira/browse/SPARK-1517.
For the SECOND part of my question - how to generate the docs locally - the docs/README.md does have instructions.
The result is shown here;
And here we are (notice localhost:4000 and Spark version 1.3.0 - which is not released yet)
The instructions are copied here:
The markdown code can be compiled to HTML using the Jekyll
tool. Jekyll and a few dependencies must be
installed for this to work. We recommend installing via the Ruby Gem
dependency manager. Since the exact HTML output varies between
versions of Jekyll and its dependencies, we list specific versions
here in some cases:
$ sudo gem install jekyll
$ sudo gem install jekyll-redirect-from
Execute jekyll from the docs/ directory. Compiling the site with
Jekyll will create a directory called _site containing index.html as
well as the rest of the compiled files.
You can modify the default Jekyll build as follows:
# Skip generating API docs (which takes a while)
$ SKIP_API=1 jekyll build
# Serve content locally on port 4000
$ jekyll serve --watch
# Build the site with extra features used on the live page
$ PRODUCTION=1 jekyll build
Pygments
We also use pygments (http://pygments.org) for syntax highlighting in
documentation markdown pages, so you will also need to install that
(it requires Python) by running sudo pip install Pygments.
To mark a block of code in your markdown to be syntax highlighted by
jekyll during the compile phase, use the following sytax:
{% highlight scala %}
// Your scala code goes here, you can replace scala with many other
// supported languages too.
{% endhighlight %}
Sphinx
We use Sphinx to generate Python API docs, so you will need to install
it by running sudo pip install sphinx.

Reuse texinfo in doxygen [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Are there any tools for converting texinfo files into something Doxygen can process (presumably markdown)? I have a bunch of old texinfo files that I'd like to link in with the doxygen docs we have. I guess I'll generate html from the texinfo and link to that from doxygen source files if I have to, but I'd rather integrate the texinfo docs into the doxygen ones.
I have been struggling with this on and off for legacy documentation on my project. I've found a solution that, while not completely automated, is workable. Since Doxygen can process markdown files, I've been converting my texi files into mardown.
Convert the texi file to html via texi2html
$ texi2html foo.texi
Convert the html file to markdown via pandoc
$ pandoc -f html -t markdown -o foo.md foo.html
Clean up the resulting markdown file with your markdown editor of choice. There are a plethora of them, but on OSX I use Markdown Pro.
Edit your Doxyfile and tell Doxygen to process the markdown files in the directory. Either add the file to your INPUT list, or add the .md extension to the FILE_PATTERNS tag. More information about Doxygen's markdown support may be found here:
http://www.doxygen.nl/manual/markdown.html