What is the correct way to install a script into a status-bar component in iTerm2 - components

I know this will sound remedial, but I'm following the instructions on the iTerm site as best I can, but I think they're too outdated.
From the example scripts I'm testing the install of a JSON pretty print script, which links to this page for how to install.
After starting this script, navigate to Preferences > Profiles > Session. Turn on Status Bar Enabled and select Configure Status Bar. Drag the Status Bar Demo component into the bottom section. Select it and then click Configure Component
Now, the "Status Bar Demo component" component no longer exists. The script and action components that are in the current build (3.x) do not have an obvious way to specify the script.
When I do specify it the path where I downloaded it, it fails — which I presume is because the .its is a binary. Double-clicking the binary brings up some Finder(?) Security install dialog. When I read through the binary file I see strings about apple certificates and such, so I assume this binary is a signed zip file/package that includes the py script that does jsonpretty.
I do the security install, and then the unpacked .py file is at a file path I can target. I make that the target of a Status Bar component (script button), again following how to install. Clicking the component button in the status bar still fails, though. Selecting JSON text in the iTerm console, or selecting no text, doesn't have how it fails.
Where do I go from here to do an installation of the script?

Related

MGCB Content Builder Won't Launch Properly

I'm trying to use the Monogame Content Builder in Linux with VS Code. I installed this extension in order to easily run the Content.mgcb file, but when I right click the file, the option to run it doesn't appear. Alternatively, when I run dotnet mgcb-editor in the terminal, this window shows up, but there's no option to import a file or do anything! This is what it looks like:
What am I doing wrong? Why won't the extension work, and why won't the the editor open properly? I'm pretty sure the editor should look like this (this image is from a tutorial).
The Linux GTK version displays differently than the windows version.
Use the New button(Leftmost on Bar) or Open button to specify the .mgcb file in the project folder.
Once a file is open, the Bar adds buttons on the left for Build, Rebuild and Clean and Save on the right.
Right-Click the Content node under project to Add existing or add new or build.

failed to launch preferred application for category TerminalEmulator?

I get this error:
Failed to launch preferred application for category "TerminalEmulator".
Step 1
Go to applications and search for qterminal and open QTerminal.
This will open a terminal.
Step 2
Type sudo apt install xfce4-settings, hit enter, wait for process to complete.
Now you can use all your applications.
After a lot of scrapping through various answers which asked to install or update various things, all just was for NO LUCK!
Then I decided to do it in my own lazy way.
I donot have any problem with QTerminal, hence I just tweak some parts in the thunar and settings.
In thunar(file manager) > Edit > Configure custom actions > Open Terminal Here (If this tag is not available then create it or if there is multiple tags with same value then keep only one and delete other)>double click on it to open and customize it.
In the next box you'll see "command" which will be run when clicking on "Open Terminal Here". Just dont write any command manually. There on the right side a "Select Application" icon is present. Just click it and select your preferred terminal. Save this change and Bingo! you'll be opening the folder in your preferred terminal.
now you'll see the command (basically path to the terminal application with a modifier f to open folder). Select only the application path and copy it, we'll need it in step 2.
In this step we will set up just tweak setting
Setting>Keyboard>Shortcuts
if Ctrl+Alt+T is already defined here then just edit it or create new "Custom shortcut"
paste the copied path of the terminal (what we copied in step 1) in the command section. Save it
DONE!!! *** You can set any shortcut key for your convenience ***

Sublime Text 3 doesnot show color scheme when opened Visualforce page

I am using Sublime Text-3 version 3.0 build 3143. I have connected to Salesforce using MavensMate and opened the VF Page, but dont see any color when Opened the VisualForce Page in Sublime Text. How to fixed this issue ??
VisualForce isn't something that Sublime supports out of the box, so in order to have things like syntax highlighting, you'll need to install a package that adds that support in.
The de-facto repository of third party add-on packages is Package Control, and doing a search reveals that there is a VisualForce package available.
The description for the package mentions that it provides syntax highlighting for .page files. Assuming that's the kind of file you're trying to open (I'm not familiar with VisualForce at all), this is probably what you want.
In particular, the content represented in your image appears like the following for me once this package is installed (except that I have elided what appears to be an extraneous </apex:outputText> after the email_us label):
For what it's worth, the package also includes completions to make creating such files easier.
Since you mentioned in comments that you're a little unclear on the process, here's a step by step set of instructions on how to get set up for this with Sublime Text 3143.
If you haven't already done so, you need to install Package Control. If it's not installed, the commands in the next step won't be available.
There are official installation instructions for this, but in your build of Sublime Text you can also select Tools > Install Package Control... from the menu or Install Package Control from the Command Palette in order to do the same thing.
If that menu item is not visible in your menu/command palette, then Package Control is already installed; the command is hidden if it's not needed.
Open the Command Palette with Tools > Command Palette or the appropriate key binding for your operation system (visible in that menu entry), then select the command Package Control: Install Package.
This will download the list of all packages and present them to you in a list; it may take a moment to download the whole thing. You'll see a spinner in the status line of the window to tell you the operation is in progress.
When the list of packages appears, select the VisualForce package from the list of packages; you can find it quicker by entering visual to filter the package list down.
Once this is done, the package will be installed; during the installation there will be a spinner in the status line to tell you, and the status line will briefly say that the package was installed once it's done, but it goes quick so if you blink you might miss it.
With the package now installed, you should be able to close your file and open it again to have the appropriate syntax applied to it.
You can also select Set Syntax: VisualForce from the command palette or select View > Syntax > VisualForce from the menu in order to manually set the syntax in the current file to the VisualForce syntax.
You'll need to do this for example when you create a new file since the default syntax is Plain Text and the appropriate syntax won't get set until you save the file with an appropriate extension first otherwise.

Does the IPython Notebook have "initialization cells"?

When I open a saved IPython Notebook, I need to evaluate all the cells with imports, function definitions etc. to continue working on the session. It is convenient to click Cell > Run All to do this. But what If I do not want to re-evaluate all calculations? Do I need to pick the cells to evaluate by hand each time?
For this problem, Mathematica has the concept of "initialization cells". You can mark some cells in the notebook as initialization cell, and then perform "evaluate initialization cells" after opening the notebook.
Does the IPython Notebook have a similar solution?
First, when you open an IPython notebook, this does not mean the state of the kernel is lost,
unless you restarted the server or explicitly stop the kernel.
Otherwise, there are no marked cell, but there is a "run until here" on dev version.
Also if you are using dev version, using Cell Toolbar /metadata and I would say ~30 line of javascript it should be doable.
I suggest you open an enhancement request on main issue tracker. This could typically be made as an extension during a sprint and/or a blog post to explain internal of notebook.
If you're using the latest and greatest of the notebooks (mine is > 4.1), the feature you requested is available through an extension.
The extensions, as well as an interface that can be conveniently used to enable/disable each individual extension, can be installed as follows
$ git clone https://github.com/ipython-contrib/IPython-notebook-extensions.git
$ cd IPython-notebook-extensions
$ ./setup.py
When you have installed the extension, start the notebook server
$ cd ; jupyter-notebook < /dev/null > .jupyter.log 2>&1 &
and go to the extension management page
$ xdg-open http://localhost:8888/nbextensions
In the recently opened browser window, enable the "Initialization cells" extension.
If you open now a notebook of yours, in the toolbar you will see a new icon, similar to a hand-held calculator and in the View/Cell Toolbar a new entry, Initialisation Cell.
Enable this menu entry and click on the cells' toolbar which ones you want to mark as an initialization cell (possibly remove the cells' toolbar) and click on the icon previously described...
When you load a notebook, the initialization cells are automatically run, so that if you want you can place them in a convenient place, say the end of the notebook if you're like me...

Duplicate greasemonkey script doesn't work - inexplicable

This is just too bizarre.
I'm new to Greasemonkey, but I downloaded a script from userscripts.org and it works fine. I then created a duplicate of that script using 'New User Script' from the GM menu and then pasted the original script into the new script. I then disable the old script and enable the new script and the new script doesn't work.
You "pasted the original script into the new script" without any edits?
Some things that can go wrong:
The new script should have a different name -- other wise the script installation(s) could get corrupted.
Does the script have #require line(s) in the header? If so, then know that the necessary resources are only fetched during a pure install and this mechanism does not work when using the "New User Script" menu.
To resolve this:
Save the new script file to a handy folder, perhaps, C:\Work\YourScript.user.js. Do not use the windows temp folder as GM install is buggy there.
In Greasemonkey's "Manage User Scripts" dialog, Uninstall the new script (and any potential name-conflicts).
In the browser, use File->Open File and browser to your script (EG C:\Work\YourScript.user.js) and open it. The Greasemonkey Install dialog should pop up.
Install the script. The required resources should now be fetched and saved properly. You can check this by looking in the scripts install folder -- which will be something like:
C:\Documents and Settings\{Win Username}\Application Data\Mozilla\Firefox\Profiles\{Random string}.default\gm_scripts\YourScript\ on a windows system.
Make sure the "Included Pages" are what you think they are. You can check this in Greasemonkey's "Manage User Scripts" dialog.
Double check the script edits. In Greasemonkey's "Manage User Scripts" dialog, press the Edit button and inspect the code.
If all else fails, paste the full, unedited, script code here -- there's probably a syntax and/or code error we can help you with. Including the code is always a good idea.
You probably didn't set up any URLs for the new script to work on.
When you select "New User Script", one of the boxes is labeled "Includes (one per line)", which is a list of the URLs for which FireFox will activate this script. Although the script itself also lists these include lines, they are incorporated into the browser's settings only at install time, not as you edit the script.
Go and look at the #include lines in your script and add them to the "Included Pages" section of the "Manage User Scripts" page and you will most likely start to see some action.

Resources