How could I set my display rotation via Terminal? - terminal

I have a dual monitor setup and I'd love to write a simple AppleScript app that when I double-click it, will toggle the rotation between 0 and 90º.
Google has so far failed me, and the one thing I did find, displaytracer installed via brew, doesn't successfully install on Big Sur and fails to find a needed Xcode Command Line Tools (mine are all installed).

Related

Mac app installed in unknown place on developer's machine

I'm developing a Mac Electron-based app. When I install the electron-builder generated pkg on Macs others than my development machine, it is installed either globally in the /Applications folder, or locally for the user - based on the user's choice during installation. It also appears properly in the Launch Pad.
However, on my development machine, when I install the app from the same pkg, it is not installed there. It is installed somewhere else - and I'm not sure where. It may be the last place where I compiled the app, but I am uncertain. Launch Pad is also uncertain, and most of the times the app does not appear there after installation.
It is obvious the Mac is keeping track of a default installation folder for each application, which for some reason overrides the user selection during installation.
Where is this taking place, and how can I reset it so the Mac app is installed where it should? It makes testing a real pain.
You can either search for the app using Spotlight search
⌘ + Space-bar
And then hold they command key after you select your app int the spotlight seach.
A bar with the location of the file will appear at the bottom of the spotlight search window.
Path for the application
Or you could search for it using the find command on terminal.
find / -name YourApp.app

How can I launch Chrome from Terminal on Mac OSX?

I am an aspiring software engineer and in doing some studying and development work I have found that it would be very convenient to have a Terminal command which would launch chrome in a new window with the first argument being passed as the URL to launch (or a local HTML file). Is there a way to do this on Mac OSX (I'm on Sierra 10.12.4)? I tried searching but the only guide I found was 5 years old and doesn't seem to work.
Bonus:
It would be even better if we could force the new window to open with the Inspection window already opened showing source code and page structure!

Aptana crashes on Mac OS Sierra

Aptana studio used to work fine on OS X El Capitan but after updating to Sierra it doesn't work anymore... Can anybody help me fix this? I keep getting a crash log every time screenshot uploaded I open the app. Something I've noticed is that the aptana icon in the applications is a folder and not just a normal app icon. Earlier as I remember it was just a normal app icon on El Capitan. I use aptana on a daily basis as a university student so its vital for me for this to work.
Edit: I have tried a lot of methods including reinstalling java but still it doesn't work. Only way to make it work is to open up the application package and open the terminal executable aptana3. It runs perfectly then but if I launch from the usual app drawer icon it crashes.
This security measure can correct it from System Preferences -> Security and Privacy -> General tab.
By default, Sierra, the option “Allow applications downloaded from does not appear Anywhere “. But with a simple instruction from the command line so we can correct.
Go to the folder Applications -> Utilities -> Terminal
In Terminal, enter or copy…
sudo spctl --master-disable
Type your password (it will not appear, however it is present) and press Enter
Click the lock and enter your Administrator password to make changes.
After changing this option, and can install any software, so if compatible with OS 10.12.
Open finder and navigate to "Applications -> Aptana"
Right click on the Aptana executable and click show contents
Navigate to "Content -> MacOS"
Double click click on AptanaStudio3
You will get a popup saying you need legacy Java SE 6
Click "More Info..." button and download and install it (very slow download, just wait it out)
Once installed double click the AptanaStudio icon in step 4 and Aptana Studio 3 will open
You will need to use that as the shortcut as the Aptana icon from installation will still not work.
Good luck.
I have same problem and solved with some workaround.
First download and install java for mac: https://support.apple.com/downloads/DL1572/en_US/javaforosx.dmg
If this not work or you reinstalled aptana after upgrading to sierra I advice to find a old copy of aptana directory and put it to application directory.
I had the same problems on MacOS Sierra; crashing on load, or the JVM error if I launch from within the package contents.
I didn't find any solution to this directly, but instead I installed the latest version of Eclipse first, then installed Aptana from Eclipse. That seems to be working.
In order to use Aptan on El Capitan, first you must install the legacy java 6 version for mac:
https://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US
The only thing is that you won't be able to access it like a normal application on your mac.
To open Aptana you must run:
Applications -> Aptana(right click to "Show package contents") -> Contents -> MacOS -> AptanaStudio3

Sprite Kit SKS file not working

Every sks file in every game project has a problem. When I open it, the default color doesn't show. It only shows the previous file with a yellow rectangle. I can't see the nodes I make, or edit them. I can only select them. When I double-click the sks file, the new window says "No Editor" with the yellow rectangle.
If you run your MAC in VMWare, this will happen.
If you upgrade to El-Capital, and install Xcode (from 6.4 to 7.3.1), the Xcode will shutdown if you click to .sks file. And it also shutdown if you create .sks file (in resource).
Sometime, you can open .sks file but it is still nothing there.
The EmitterNodes are no way to exist in VMWare. So, when you run your app in real Iphone, it will make an error CAMetalLayer: calling display has no effect.
I think that is not about the VMWare, all that because of MAC retail that you installed.
The author of MAC retail just make it for everyone to explore OSX, not to do everything with OSX.
And, all applications we know always have some mistakes (that need updates).
Or you wait for new MAC retail
Or do not use .sks file (it will not change your game anymore)
Or buy a MacBook. (or Imac certainly)

Ruby Shoes won't start in Leopard

So I wanted to try doing some easy Ruby GUI programs using Ruby Shoes. I downloaded Shoes 3 for OS X, opened the dmg and installed it to the Applications folder. When I click on the icon in the folder, or drag a source code file to it, the icon briefly appears in the dock and bounces, and then disappears without anything running. So I can't use it. The computer I'm trying to run it on is running Leopard - is that the problem?
Have you tried building shoes 4? You might want to check it out, and check the readme. I can confirm it working on my 10.6 mac, which is about as close to leopard as you can find. Just try the directions for *nix and it should work, as far as I know.

Resources