How to run SublimeREPL on remote python - sublimetext

I want to run my python code on a remote environment (I have more cores/RAM etc...) and I have no idea how to do that in SublimeREPL. Do I just update the python_virtualenv_paths?
from:
"python_virtualenv_paths": [
"~/.virtualenvs", // virtualenvwrapper
"~/.venv" // venv.bash https://github.com/wuub/venv
],
to:
"python_virtualenv_paths": [
"~/.virtualenvs", // virtualenvwrapper
"~/.venv", // venv.bash https://github.com/wuub/venv
"ssh my_remote"
],

Related

How to install golang package with custom tags in nix-shell?

I want to use go-migrate in my development environment, so I fill my shell.nix with
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.go-migrate
];
}
But it will install go-migrate without any database drivers, so I can't use it. As I see in official installation instructions I should provide tags with needed database, but how to do it with nix?

Using Git Bash terminal in VS Code - how to force it to open internally

Duplicate: I asked this on SuperUser without answer
Using:
editor: VS Code
terminal: Git Bash
VS Code offers a shortcut Ctrl+Shift+C to open it externally and a shortcut Ctrl+` (or in my case Ctrl+F1) to open it internally.
In my case it opens it externally with both shortcuts as well as with menu View->Terminal.
I turned Google upside down to the best of my knowledge to find this solution.
I have reinstalled Git from git-scm.com.
I checked my VS Code settings (Code\User\settings.json) to find a clue, if I accidentally set to force external opening myself.
I know I shouldn't paste an entire file, but maybe you find where the problem in settings.json lies:
{
// Chosen Terminal
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
// Prevent losing aliases, colorization etc. for the Git bash terminal
// "terminal.integrated.shellArgs.windows": [
// "--login",
// "--init-file",
// "C:\\Program Files\\Git\\etc\\profile"
// ],
// Windows Terminal
"terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe",
// Chosen Theme Color and Color Customization
"workbench.colorTheme": "Monokai",
"workbench.colorCustomizations": {
"[Monokai]": {
// "statusBar.background": "#666666",
// "panel.background": "#555555",
// "sideBar.background": "#444444",
"tab.activeBackground": "#999999",
"tab.activeForeground": "#333333"
}
},
// Emmet Customization
"emmet.triggerExpansionOnTab": true,
// Editor Customization
"editor.fontSize": 14,
"editor.wordWrap": "on",
"editor.codeActionsOnSave": {},
"editor.tabSize": 2,
// PHP Tooltip Suggestions
"php.suggest.basic": false,
"php.validate.executablePath": "C:\\xampp\\php\\php.exe", //for linting
"php.validate.run": "onSave", //change to onType if need be
"explorer.confirmDelete": false,
"beautify.language": {
"js": {
"type": [
"javascript",
"json",
"jsonc"/*,
"html"*/
],
"filename": [
".jshintrc",
".jsbeautifyrc"
]
},
"css": [
"css",
"scss"
],
"html": [
"htm",
"html"
]
},
"beautify.config": {
"indent_size": 2,
"indent_char": " ",
"css": {
"indent_size": 2
}
},
// Git costumization
"window.zoomLevel": 0,
"workbench.colorCustomizations": {
"gitDecoration.addedResourceForeground": "#f45342",
"gitDecoration.modifiedResourceForeground": "#3888d8"
},
"workbench.settings.useSplitJSON": true,
"files.trimTrailingWhitespace": true,
"minify.minifyExistingOnSave": true
}
If I use Ctrl+Shift+C shortcut, let's say on two different projects, it opens two external terminals just as one would expect.
If I use Ctrl+F1 (default Ctrl+`) shortcut it wants to open them internally so bottom part of VS Code windows looks like this:
And it still opens them externally:
Can anyone provide some insight?
It seems adding "terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe" to Settings is the old way and doesn't work as expected.
Delete all lines related to bash from Settings JSON (check User, Workspace and Folder Settings to be sure) and save the file.
Then just open Command Palette (Ctrl + Shift + P) and type in
Select Default Shell
and choose bash from there.
Now all you have to do is restart VS Code and terminal will be running as expected.
For shells that aren't in your %PATH%, see the other answers.
See the complete Visual Studio Code shell reference.
There should be pre existing Terminal profiles already configured so it should be as simple as adding:
"terminal.integrated.defaultProfile.windows": "Git Bash",
to your settings.json

Brew available files for different macOS version

Take install Python for example.
==> Installing opencv dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.tar.gz
The brew SW download the one that's matched with my current macOS version as default. (In this case, it's for high_sierra (10.13.x) macOS).
But I'd like to get other build version for previous macOS version (e.g. 10.10.x).
I notice that the SW that's all downloaded from https://homebrew.bintray.com/bottles/.
But unfortunately, I can't view the available files under the https://homebrew.bintray.com/bottles/ path.
Is there a command to view available files (e.g. Python) for different macOS version ?
You can use either brew info --json=v1 <formula> or Homebrew’s public JSON API:
$ brew info --json=v1 python | jq .
[
{
"name": "python",
"desc": "Interpreted, interactive, object-oriented programming language",
"homepage": "https://www.python.org/",
// ...
"bottle": {
"stable": {
// ...
"files": {
"high_sierra": {
"url": "https://linuxbrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.1.tar.gz",
"sha256": "7e0fc1b078b51d9478ab08660d5df01611976a7af0f6c24054bda58264bb506c"
},
"sierra": {
"url": "https://linuxbrew.bintray.com/bottles/python-3.6.5.sierra.bottle.1.tar.gz",
"sha256": "2fe5ca9be0f1596798927c4aa1d4d187ca7f83adc4681483cec2cc52d7c95386"
},
"el_capitan": {
"url": "https://linuxbrew.bintray.com/bottles/python-3.6.5.el_capitan.bottle.1.tar.gz",
"sha256": "bccf50de973644608af29652f2660124d033f3213d422fe44a7f012a47643a95"
}
}
}
},
// ...
]
Using jq:
$ brew info --json=v1 python | jq -r '.[]|.bottle.stable.files[]|.url'
https://linuxbrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/python-3.6.5.sierra.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/python-3.6.5.el_capitan.bottle.1.tar.gz
Note it works with multiple formulae:
$ brew info --json=v1 python git | jq -r '.[]|.bottle.stable.files[]|.url'
https://linuxbrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/python-3.6.5.sierra.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/python-3.6.5.el_capitan.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/git-2.17.1.high_sierra.bottle.tar.gz
https://linuxbrew.bintray.com/bottles/git-2.17.1.sierra.bottle.tar.gz
https://linuxbrew.bintray.com/bottles/git-2.17.1.el_capitan.bottle.tar.gz

Message appears when running scsslint

I am following the step by step on https://www.npmjs.com/package/grunt-scss-lint
I have installed everything, and seems to be working fine when I type in Terminal 'scss-lint'.
However I want this to be running in Grunt
Gruntfile:
scsslint: {
allFiles: [
'src/scss/**/*.scss',
],
options: {
bundleExec: true,
config: '.scss-lint.yml',
reporterOutput: 'scss-lint-report.xml',
colorizeOutput: true
}
},
grunt.registerTask('default', ['js', 'html', 'scsslint',]);
so I type in grunt in terminal which will run the tasks and in terminal - this pops up:
Running "scsslint:allFiles" (scsslint) task
Running scss-lint on allFiles
Please make sure you have ruby installed: ruby -v
Install the scss-lint gem by running:
gem update --system && gem install scss-lint
Running through grunt does not work but typing scss-lint in terminal works.
I did the following message but this message does not disappear
Your problem is related to the bundleExec parameter. If you set it to true, the plugin will expect the gem to be installed via bundler.
Set it to false, and it will work.
scsslint: {
allFiles: [
'src/scss/**/*.scss',
],
options: {
bundleExec: false,
config: '.scss-lint.yml',
reporterOutput: 'scss-lint-report.xml',
colorizeOutput: true
}
},
grunt.registerTask('default', ['js', 'html', 'scsslint',]);

sublime text build system for jekyll

I'm trying to get a build system for the Jekyll gem in sublime text. In my sublime-project I have the following:
"build_systems":
[
{
"name":"jekyll",
"cmd":"/Users/kaass/.rvm/gems/ruby-1.9.3-p327/bin/jekyll",
"shell":true,
"path":"/Users/kaass/.rvm/bin/rvm-auto-ruby",
"working_dir":"$project_path"
}
]
I have tried playing around with env as well as different options above, but always get some sort of error pertaining to ruby or jekyll not found or env: ruby_noexec_wrapper not found
I'm running 10.8.2 and my path :
kaass:~ kaass$ echo $PATH
/Users/kaass/.rvm/gems/ruby-1.9.3-p327/bin:/Users/kaass/.rvm/gems/ruby-1.9.3-p327#global/bin:/Users/kaass/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/kaass/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/bin:/usr/X11R6/bin
Everything I'm trying to call is already in my path.
I had a similar problem running rake within the correct rvm environment.
This is the sublime-project file I ended up with:
{
"folders":
[
{
"path": "data"
}
],
"build_systems":
[
{
"name": "rake",
"cmd": "source ~/.rvm/environments/ruby-1.9.3-p194#mygemset && rake",
"shell": true,
"path": "/bin:/usr/bin:/usr/local/bin:~/.rvm/bin",
"working_dir": "$project_path"
}
]
}
The trick was to add ~/.rvm/bin to the path and to source the environment of the rvm gemset.
Then I can even use the "rake" command without specifying a full path.
The rest is straight-forward.

Resources