You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a big fan of the syntastic package. In python, it is useful for viewing both Pyflakes and Bandit errors. However, this only works if syntastic knows what python interpreter to use.
Not everyone is fortunate enough to have upgraded all of their software to python3. For reasons out of my control, I end up spending most of my time writing python2 code. This means that the times when I finally get to write python3, all of my syntax checking is broken. How cool would it be to have VIM determine what version of python to use automatically? So, begins my grand experiment...
Prerequisites
For this to work, I will be using a virtualenv for python2 and one for python3. It's not absolutely necessary to use virtualenvs but I definitely recommend it. Setting up virtualenvs is out of the scope of this gist but make sure that each virtualenv
Checking for Python Security Vulnerabilities with VIM
Checking for Python Security Vulnerabilities with VIM (Buffer Pre-write Hook Part 3)
Introduction
To continue my series of vim pre-write hooks, I wanted to add a new check for security static analysis failures. To see the progression of the series, please check out my other gists.
Back to security... In my office, we use OpenStack's Bandit static analysis tool. If you're not familiar with it, you should check it out. It's pretty nifty.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I ran into this issue while at work and came up with this solution. This gist is mostly just documentation for myself so I can remember what I did 6 months from now. I am in no way saying that this is the right way to fix things but I'll be thrilled if this is in any way helpful to others. That being said, I make no guarantees that bad things will not happen to your machine if you follow these directions. Proceed at your own risk.
Although, I mention using the following setup to resolve an issue I was having using xmonad as my windows manager, I don't think there's anything special about it. It should be possible to use the following steps with any windows manager.
Problem
Setting up multiple monitors in xmonad requires defining the screen configuration using xrandr. The problem is that xmonad does not respond to a laptop being placed or removed from a docking station. Obviously, the solution is to update the monitor configuration on the
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters