How do I download a rule yaml file directly? - semgrep

Is there a way to download a Semgrep rule's yaml file from providing the rule name id? I know that you can bring them manually from the registry (via copy/paste).. but I am looking for a faster way so I can test rules locally.

The best way to find all rule yaml files from Semgrep is through the Semgrep Rules Github Repository. You can use the rule-id to search for it using the "Go to file" button within the repo:
"Go to file button within repo"
"Searching for rules via rule-id".
Once you have located the rule you wish to download, right-click on the "Raw" button and then click "Save link as..." to download the yaml file directly.
"Rule yaml file within repo"

Related

how to install my customs' cuix,vlx and mnr files to autocad supported files programmatically

I would like to know how I can load my own custom autocad files to the autocad working supported files without options inside Autocad software, but programmatically.
I have these following files that I want to load to supported files of autocad programatically ,
.cuix file
.vlx file
.mnl file
.mnr file
.fas file.
I tried with inno setup.
Honestly, I don't know how to do.
Please guide me or teach me how to do.
As per my understanding, you can achieve this stuff by Autoloading those File, while the AutoCAD is started, there is plenty amount of solution available on internet you may check this link1 Link2
Or you can refer below step(Before following this step read above link)
1.Write a function to load the required file as you mention in Question
(defun Load_File()
;To load CUIX file "<..MyPath.../MYMENU.CUIX>" replace this with you CUIX file path
(command "_MENULOAD" "<..MyPath.../MYMENU.CUIX>" "")
;To load VLX file "<..MyPath.../MY.VLX>" replace this with you VLX file e path
(command "_appload" "<..MyPath.../MY.VLX>")
;Loading a MNU file overwites the corresponding .MNR, .MNS and .MNC files. Keep in mind that if you make any custom toolbars ;and/or buttons using the graphical on-screen method - they will be wiped when you load the MNU
;(I am not sure about MNL/MNR file loading you may try this )
;To load MNLfile "<..MyPath.../MY.MNL>" replace this with you MNL file e path
(command "_appload" "<..MyPath.../MY.MNL>")
;To load Fas file
(load "<your .Fas file path/my.fas>"
)
(load_File)
2.save this file with name as Load_file.Lsp on trusted path (ie "c:/trusted path/...../Load_File.lsp")
(if lisp file is save in trusted path of AutoCAD so AutoCAD not show pop-up while lisp file is load )
3.make new lisp file so it can Autoload as AutoCAD is started with name "acad.lsp" put below code inside file (this code say that load our first "Load_File.lsp" file)
(load "c:/trusted path/...../Load_File.lsp")
this lisp file must be save in install directory of autocad (Ex. "C:\Program Files\Autodesk\AutoCAD 2018") this step is for automatically load "acad.lsp"
As soon as acad.lsp is loaded all your files are load in Autocad.
InnoSetup is a very good choice for You. I use it for few years and it let me do anything I need.
If You have InnoSetup installed, just click File->New and InnoSetup Script Wizard will guide you through the process of creation script. One of the steps is Application Files, where just select Your files mnu, cuix, fas whatever You like
After that compile ( just one click ) and You have Your setup.exe
Using Innosetup You may install files, but also manipulate OS registry - which may be helpful for Your application, but also set Acad supported files paths.
here
You can find more details about how to load Your application to Acad after is installed.

Jetbrains - Include ignored files when committing

I'm working on quite a large modular project in Webstorm. The js code is compiled with Babel to ./dist folder, so are the assets like html templates and other files.
I would like to EXCLUDE ./dist since when I do a global search of "Navigate to Symbol/Class/etc", I don't want results from ./dist to be shown, so I mark the ./dist folder as excluded.
BUT due to the workflow and the modularity (projects are modules loaded with jspm), I need to commit changed ./dist into VCS (Git). This is our workflow and I can't do anything about that.
The problem:
When I click "Commit changes" I don't see the newly changed files in ./dist when I exclude this folder. Clicking on "Refresh changes" doesn't help.
Can I solve this issue somehow?
UPD
The ./dist directory is NOT in .gitignore
You shouldn't exclude this directory from vcs, if you want or need to have it under version control. But for setting the directory, where IDE shouldn't search, you should set up IDE.
You have to remove your directory from git ignore or what ever, and set up ContentRoot in your IDE. I'm using PhpStorm and IntelijIdea, but the settings are common for all JetBrains Products.
Here is the part of JetBrains instruction :
To have files or folders excluded by name
1. Do one of the following: – Open the Settings dialog box, and click Deployment, then click Options below the Deployment node .
– Choose Tools | Deployment | Options on the main menu.
2. In the Options dialog box that opens, specify the patterns that define the names of these files and folders in the Exclude items by name text box. Use semicolons as delimiters. Wildcards are welcome.
The exclusion is applied recursively. This means that if a matching folder has subfolders, the contents of these subfolders are not deployed either.
So , you can read this : exclude files and restore the settings, and after that, use the next link, to set up the root directory.
Here is the instruction from JetBrains : JetBrains-Content Root

Show HTML artifacts in bamboo without downloading

I've successfully created a small demo HTML report of test results from a build. Simply put, I'm doing numerical computations, and would like to give more detailed information on test results than a binary pass/fail. The HTML report consists of multiple HTML files with relative links between them.
However, linking to one file from the other sometimes leads to the file being opened in the browser, and sometimes a "download file" dialog opens. Any ideas what the rules are, so I can look at the whole report in-browser without resorting to downloading a zip file of the whole report, unzipping, etc etc?
Just a quick note here, if anyone should need it - as this was where I ended up in my search.
After upgrading our Bamboo to 6.8.1 build 60805 our code coverage artifacts started downloading, instead of being displayed inline.
This can be fixed by setting the Security and permission setting Allow artifacts to be embedded in Bamboo pages.
Be aware of the note about Cross-Site-Scripting vulnerabilities if enabled.
On our project we use this simple solution
1.In Stage configure final task script to copy reports to some folder:
echo "Copy artifact report"
rm -rf ../artifacts
mkdir ../artifacts
cp -r functionalTests/build/html/behat/* ../artifacts/
2.On Artifacts tab edit artifact definition and set Copy pattern to artifacts/**
Then when you navigate to build artifact then folder with reports will be opened in browser
To have an embedded html page in bamboo showing the coverage results, this page has partially helped me to make bamboo cooperate with python coverage:
Troubleshooting
The Clover tab shows the directory listing instead of the HTML report
Please check which artifact handler you use. The Amazon S3 Artifact
Handler serves files on a one-by-one basis, instead of exposing all
files as a static website. To change this, open Configure plan and on
the Miscellaneous tab select the Use custom artifact handler settings
check-box. Then select Server-Local Artifact Handler for shared and
non-shared artifacts and finally re-run the build.
In my setup though "Server-Local Artifact Handler" failed completely, but choosing "Bamboo remote handler" did the job.

IntelliJ Macro for external tool (compass)

I am trying to integrate the use of the compass scss framework in intellij. For that I created a new external tool in a group named "My Tools".
Under "Program" I entered the path to the compass.bat file, "Parameters" is "watch". For "Working directory I entered
$ProjectFileDir$\$ModuleName$\src\main\webapp
at first, but this is kind of ugly because the folder with the config.rb is not always in the same directory-structure... Is there any way to enter a Macro for a selected folder in the project tree of IntelliJ so I can start "compass watch" via context menu in the selected folder?
I changed the "Working directory" to "$FilePrompt$" now which is a better solution than the first one, but I still have to point to the directory with the config.rb and I want it to be selected via right click in the Project Tree...
$FileDir$ should do the thing
You can also try configuring a file watcher for compass - see this thread for details

automatically place downloaded files in folder bsed on downloads extension suffix

I’m making a simple web browser for work eeh, what I’d like to know is if its possible to save a file of a particular extension to a particular file.
I currently use google chrome when downloading a file it places this (regardless of extension) in a downloads folder without asking where I ant to download this too.
I want to achieve the same except that downloads with the extension .dwg are placed automatically in a folder named DWG DOWNLOADS…
How to achieve this in vb.net?
In any browser you have a config section.
In Firefox you have browser.download.useDownloadDir;true and browser.download.folderList;1
you can add your own config to allow different saved folder paths and dynamically modify them depending on the extension of the file you uploaded.
See a complete list of the web browser config with about:config in address bar.
Not real sure what you are asking, but if you are actually making a web browser just check the extension of the file you are requesting to download. If the extension is ".dwg" then save the file to the folder you want.
If you are wanting to automatically move Google Chrome downloads to a different directory, you can use a FileSystemWatcher to monitor for new files in Chrome's download directory and move them to another folder based on each file's extension.