How to fix Automator date-time script in Mojave - automator

having issues getting a simple one-line automator script to work under Mojave.
An old script I used to have installed and use (built in Automator) no longer works...
The script in automator was as follows:
# return 24hr date and time
date +'%m/%d/%Y %H:%M:%S'
The above is all what was set in Automator.
After installing the script through the automator file named "24-hr-time.workflow" I set up a keyboard shortcut to trigger the workflow to run.
I set it so that it runs as a service under System Preference, Keyboard, Shortcuts, Services, 24-hr-time (under the text heading).
Well, it doesn't work any more. Not sure why. I thought it may have been because of a keyboard shortcut conflict with another function. So, I tried several different ones and the problem persists. Such that when I trigger the service by using the shortcut keys, nothing happens. Basically, it just doesn't work.
What do I do?
OS: I've upgraded to Mojave (10.14.4).
Thank you.
The desired result is that when I press the shortcut key combination (e.g. Cmd+8), that the 24-hr-time workflow runs, thereby inserting the date and time into whatever application is being used.

Works fine for me.
I created a Quick Action in Automator (Services are now called Quick Actions).
I configured it like this:
I saved it as TodayDate. I gave it a keyboard shortcut in Preferences:
I used my keyboard shortcut in a TextEdit document and it worked fine:

Related

VS Code doesn't continue inputs (Dart)

I have started learning Dart for 2-3 days, something I have noticed is that when I use replit.com, I can continue getting inputs and outputs, for example in this code:
I have the exact code in VS Code and here:
https://replit.com/#Vonarian/anotherhello?v=1
When I click run and debug in VS Code, I enter the Student I want the name/nick of, and then nothing happens, like only one input and it doesn't bring up anything.
I also have tested different codes and projects and it's the same, works on replit but not in VS Code.
Not continuing in VS Code
This happens because the default mode of running Dart scripts is using the Debug Console so that you can use the REPL. Although you could run the script through the Terminal to solve this, it won't allow you to use the debugging features (like breakpoints, or pausing on exceptions).
You can change the default way of running CLI scripts with the Dart: CLI Console setting in VS Code as shown here:
This will set it globally (or if set in the Workspace Settings, just for that workspace). Otherwise, you could add "console": "terminal", into a launch.json configuration to have it apply only to a specific launch configuration.

How to disable automatic function docstring generation in Spyder?

Spyder (the Python IDE) generates a function docstring automatically when you click Enter after the first line of the function def. How can one disable this feature?
I've looked around in Tools (for instance in Tools -> Preferences -> Editor) and did not find a way to do it. But there are tons of features in Spyder so maybe I'm missing it.
Are you using an anaconda install with kited running in the background? Opening task manager and stopping this from running fixed the problem for me.
Edit: This may be incorrect
When you type in the triple quotes, an icon will pop up that says Generate docstring. When this happens, do not hit Enter. Just hit esc.
Until we can just deactivate it in settings, that's what I've been doing.

How to print a file from VsCode?

I want to send the file I'm currently editing to a printer, like I did in Notepad++ for example.
I havn't found any hint on a print command. Is it not possible ?
It is not yet available, but I found an issue report for that feature.
It's currently in the backlog, so we can expect it soon.
https://github.com/Microsoft/vscode/issues/5953
Edit:
In the meantime:
https://marketplace.visualstudio.com/items?itemName=nobuhito.printcode
https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print
Now you can install addon for VS Code - search "PrintCode".
Note that the repository for this extension was last updated in February 2018 with numerous issues outstanding.
I found the PrintCode extension inspiring but unfinished and with a number of flaws. In particular it depends on a specific paper size to wrap and as a result does not respond well if you change paper size or orientation in the print dialog.
It's open source so I looked at the code and didn't like that either. No programmer ever likes another's coding style. So I pinched the idea of using a web-browser as platform driver for HTML printing -- my hat is off to the PrintCode author for that cunning insight -- and wrote my own.
In the process I fixed all the known bugs, added everything on my wishlist and a couple of things suggested by others. The biggest thing was figuring out the CSS required to respect print dialog paper size and orientation. This also sorts out the mysterious disappearing line numbers problem, although I'm not sure why. The next biggest thing was learning to probe for an unused port, a problem that also afflicts PrintCode causing the browser to open showing no content.
Major issues
PrintCode depends on a web service. You can't use it offline.
Many people want to be able to open a file, select a portion and print just the selection.
The print dialog supports changing paper size and orientation. This clashes with the way PrintCode works.
Some people like to run multiple VS Code windows.
When you print a markdown file, you probably don't want it printed like a text file when it can be rendered with fonts and proper headings and bullets etc.
Support is required for remote workspaces.
Because each instance of VS Code needs a different port for its embedded webserver, you can't just use a setting. Dynamic port allocation is necessary.
Remote workspaces weren't even a thing until two years after maintenance ceased on PrintCode.
If you want to survey your options, get onto https://marketplace.visualstudio.com, choose the Visual Studio Code tab and search for printing.
If you just want a link to my version, it's here http://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print.
If you like what you see but need something I haven't thought of, the marketplace page has a link to the repo on github. Create an issue and tell me what you need -- or write it yourself and submit a PR.
Now there is an extension available for printing from the VS Code Editor.
It's called VS Code Printing Free.
I've tried it for a couple of days and it works fine.
Poor man's answer: Copy code to Notepad2 or Notepad++ and print from there.
The colour coding will be different though
You can use an Extension of VS Code: PrintCode
Install extension PrintCode
On Mac: command + shift + P
choose command> PrintCode
I have modified the https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print. If you change the values that I have marked in the picture in the extension settings a browser tab opens with the you can then print this also works on the Ipad. It works also with the code-server Version inside a Docker Container.
I put the file on github https://github.com/chrishdx/vsc-print
enter image description here

TextMate ToolTip Fonts

i'm new to textmate.
for the "complie&run" job for the java bundle, i set the output: "Show in tooltip" format "text". Everything works exactly as it should. The problem is the tooltip font is not proportional to the font of the text. for ex, doing a "Command+" or "Command-" doesn't proportionately change the font-size of the tooltip.
i also tried $defaults write -g NSToolTipsFontSize 24.0 which does a good job for chrome/safari browser apps (tooltip gets larger) but not for mate.
To know exactly what i mean here's the dropbox link: TextMate ToolTip Image
i am using textmate2, lion 10.7 on a macbookpro.
thank you all in advance.
I'm using Mavericks and needed that as well but could not get NSToolTipsFontSize to work; upon requesting the support staff at to help, they have added the support for that in their edge build.
Now I can use
$defaults write com.macromates.TextMate.preview NSToolTipsFontSize 24
I checked it and it works for me. Please see their response below:-
We’ve added support for this value now, it is available in the current edge build. Go into Preferences and do to the Software Update tab and hold option while clicking check now, you will get r9569 with this added.
(Note that this won’t cover popups created via TMDialog but only those created as output from bundle items, but this will cover 95%+ of the cases.)
com.macromates.TextMate.preview did not work for me on Mac OS 10.13 with TextMate 2.0 RC 10... Below default command rather worked
defaults write com.macromates.TextMate NSToolTipsFontSize 24

not enough space for environment appears when executing ".exe" file

I am trying to use an application called CLUT.exe which is an old application for MS-DOS that can be used to reindex NTX files for DBF databases.
(This is not the main topic, but I am just writing this if someone wants to test the app and don't trust at all about the content).
The problem starts when trying to run the command line version through console (cmd.exe) and this error appears:
C:\>CLUT.exe [arg1] [arg2] [arg3]
run-time error R6009
- not enough space for environment
So, according to what I've searched, this could be a possible solution:
http://support.microsoft.com/default.aspx?scid=kb;en-us;230205
but it doesn't work and every alternative that I found to solve this over the internet is the same.
Another alternative could be to make right-click in the .exe file, go to Properties then Memory tab and increase the Initial environment memory from Auto to the max value but it doesn't work too.
Well, I am stuck and no "possible" solution is working for me. If someone is interested, knows more about this issue and want to test, you can download the application from here (click "Free Download" green button):
http://www.filebasket.com/free/Development-Clipper-programming-language/clut-exe/13996.html
or directly from my DropBox:
https://dl.dropbox.com/u/15208254/stackoverflow/clut_214.rar
Just to know, I am using Windows 7 and the CLUT.exe application is a Clipper based app (old programming language) that may run under windows console (cmd.exe).
Wikipedia does mention other dos emulators but, oddly, doesn't mention BOCHS.
Reindexing NTX files is not a difficult thing to do, and can be done with tools other than CLUT. For example, many of the utilities listed on this part of Download32 could be used. Otherwise, you could write your own using Harbour Project or xHarbour. Or contact me off list and I'll cook up something in Clipper 5.3.
LATER
If I read the README correctly for CLUT, it's a replacement for the DBU utility that comes with Clipper 5.x. I can supply you with a build of that if you're unsuccessful with other approaches.

Resources