Posts

Showing posts with the label Macos

Apple - Changing Emoji Shortcut

Image
Answer : This will work everywhere that Emoji & Symbols has a menu item... System Prefs > Keyboard > Shortcuts > App Shortcuts Click 'All Applications' (hidden in the picture) Click + Type Emoji & Symbols in the first box Type your replacement trigger in the second Click Add

Apple - AutoHotkey Equivalent For OS X?

Image
Answer : Check out Hammerspoon. It seems to be very fully featured and — like AutoHotkey — offers a programmatic way to do all sorts of OSX automation, in addition to key binding/remapping. (It takes a plugin based approach. Karabiner, mentioned in an answer above, can be used as a plugin too allowing its functionality to be enhanced in all sorts of ways.) http://www.hammerspoon.org/ I recommend Keyboard Maestro which lets you set up macros with various actions that can be triggered with keyboard shortcuts or other triggers. I use Karabiner. It is a bit of a pain to customize (it uses XML), but it is just as powerful as AHK. It can also move the mouse.

Adb Command Not Found

Answer : In my case with Android Studio 1.1.0 path was this /Users/wzbozon/Library/Android/sdk/platform-tools Add the following to ~/.bash_profile export PATH=~/Library/Android/sdk/tools:$PATH export PATH=~/Library/Android/sdk/platform-tools:$PATH Is adb installed? To check, run the following command in Terminal: ~/Library/Android/sdk/platform-tools/adb If that prints output, skip these following install steps and go straight to the final Terminal command I list: Launch Android Studio Launch SDK Manager via Tools -> Android -> SDK Manager Check Android SDK Platform-Tools Run the following command on your Mac and restart your Terminal session: echo export "PATH=~/Library/Android/sdk/platform-tools:$PATH" >> ~/.bash_profile Note: If you've switched to zsh, the above command should use .zshenv rather than .bash_profile Make sure adb is in your user's $PATH variable. or You can try to locate it with whereis and run it wit...

Apple - Are Apsd, Ntpd, MDNSResponder, Trustd, Netbiosd Necessary For MacOS Functioning?

Answer : apsd - Used for FaceTime push notifications ntpd - Used to synchronize clock mDNSResponder - Part of the Bonjour protocol, used to scan your network for other Bonjour-enabled devices (printers, computers, etc...) trustd - Used for validating SSL certificates netbiosd - Used when interacting with Microsoft shared drives This is all normal activity. However, if you are worried about security, you can disable the services you don't plan on using. Edit: You might not want to disable ntpd and trustd as they are necessary for basic functionality such as browsing websites.

Clipboard Manager For Mac

Image
Answer : UPDATE I have actually now started using Clippings from the app store. It's $2.99 and worth it. The reasons I decided to stop using PTHPasteboard were that it is a little buggy and I tried to send feedback to the author but never heard anything. Also it is expensive at $25. Wish the author was continuing development and taking requests for a couple of UI/UX fixes, but until then I really like "Clippings" ORIGINAL POST I'm coming from Windows and LOVED the Ditto clipboard manager. It was SO SIMPLE and powerful. Wish I could find the same thing for Mac. I first tried ClipMenu and Jumpcut , and have also tried using Quicksilver 's built in clipboard manager. I have not been too happy with any of them. I also looked at a few articles describing the so called best clipboard manager for mac, like this one. The closest one I could find was Clyppan ($5) until I found this question and tried PTH Pasteboard as Mark had suggested. Here's the...

Chrome Not Saving Passwords On Mac

Image
Answer : I had the same issue when my IT folks at work nuked my keychain. I uninstalled and installed chrome following the steps here. Go to ~/<username>/Library folder. Delete Google folder from ~/Library/Application Support . Delete below folders from ~/Library/Caches Delete ~/Library/Google folder Make sure you’ve shut down Chrome while performing this action and then either move the folder to the trash or rename it to something like backup. Chrome and then start Chrome up again. This will fresh start your Google Chrome. An important addition to this comprehensive answer. This will only work if you sign out of your Google account in Chrome. I tried this method several times and it wasn't until I signed out of Chrome, then deleted all the cached items and the Google folder in the Library folder that my passwords were restored. Also, another tip (as osx has been updated). To view the Library folder, when in the User folder cl...

Apple - APFS/High Sierra - `tmutil Deletelocalsnapshots` Not Deleting Snapshots

Answer : I think the least-recent time machine snapshots was corrupted - potentially from some system crashes caused by APFS bugs. I tried running DIsk Utility's first aid, but that froze my computer for over 3 hours (maybe it ran out of space to work with?) - I ended up having to force-restart. I solved the problem by running first aid booted from an external hard drive install of High Sierra. It removed some old snapshots. I then was able to boot from my normal drive and run tmutil deletelocalsnapshots... which successfully deleted the snapshots and freed up space Great solution detecting that the filesystem was corrupt when the normal commands were note working. Also note, you can avoid iterating on the list of snapshots and just direct the system to reclaim space up to and surpassing the limit you choose: tmutil thinlocalsnapshots / $(echo "5 * 1000000000" | bc) 2 The above command asks for 5 GB of cleaning. I chose the echo math to make it easy to dial u...

Apple - Alternative To Windows Snipping Tool For Mac OSX

Answer : There is now a blog entry about Taking Screenshots in a Snap . It's built into Mac OS. ⌘ + ⇧ + 3 captures the whole screen ⌘ + ⇧ + 4 captures a custom rectangle (click and drag over the screen region you want to capture) ⌘ + ⇧ + 4 then space captures a specific window (move the mouse cursor over the desired window, then click) Press esc to cancel. Screenshots are saved onto your Desktop and timestamped. Holding control in addition to any of the sequences above causes the image to be copied instead of saved to the desktop. By default the image format is png . However, you can change the format by typing in the Terminal : defaults write com.apple.screencapture type image_format killall SystemUIServer Where image_format is one of jpg , tiff , pdf , png , bmp or pict (among others). If you omit the second line, you will need to log out and in again for the change to take effect. The settings for the shortcuts in the system preferences are ...

Apple - Can I Change The Default Mac App Store Install Folder?

Answer : Regarding Mac OS X File System Overview , it seems Apple enforcing the standard compliance for developer to follow their rules on application folder which are within /Applications or ~/Applications. The concern is to comply the way Mac App Store deliver the updates. if you not comfort enough to use default folder, yes you are still able to move the application which you had download from Mac App Store to another folder with two caveats: You will be required to enter an administrative password to move the app from the /Applications folder. If an update appears in the MAS for an installed app that has been moved you will get an error message about having apps installed from another account. To update the app you will have to Delete the app entirely and then install the updated app or Move the app back to the /Applications folder At this point there is no details on this (But I am sure there is a property or .plist) but in the meantime you can create a simple A...

Change Templates In Xcode

Answer : You wouldn't change the existing templates. In other words, don't modify anything under the /Developer hierarchy (or wherever you installed your developer tools). Instead, clone the templates you want to have customized variants of. Then change their names and the information in them. Finally, put them in the appropriate location in your account's Library/Application Support folder, specifically: File templates: ~/Library/Application Support/Developer/Shared/Xcode/File Templates/ Target templates: ~/Library/Application Support/Developer/Shared/Xcode/Target Templates/ Project templates: ~/Library/Application Support/Developer/Shared/Xcode/Project Templates/ That way they won't be overwritten when you install new developer tools, and you can tweak them to your heart's content. Update For newer versions of Xcode the updated path will be: ~/Library/Developer/Xcode/Templates/File Templates/Source This may be useful for somebody: As for X...

Check OS Version In Swift?

Answer : For iOS, try: var systemVersion = UIDevice.current.systemVersion For OS X, try: var systemVersion = NSProcessInfo.processInfo().operatingSystemVersion If you just want to check if the users is running at least a specific version, you can also use the following Swift 2 feature which works on iOS and OS X: if #available(iOS 9.0, *) { // use the feature only available in iOS 9 // for ex. UIStackView } else { // or use some work around } BUT it is not recommended to check the OS version. It is better to check if the feature you want to use is available on the device than comparing version numbers. For iOS, as mentioned above, you should check if it responds to a selector; eg.: if (self.respondsToSelector(Selector("showViewController"))) { self.showViewController(vc, sender: self) } else { // some work around } Update: Now you should use new availability checking introduced with Swift 2: e.g. To check for iOS 9.0 or later at ...

-bash: Export: `=': Not A Valid Identifier

Answer : You cannot put spaces around the = sign when you do: export foo=bar Remove the spaces you have and you should be good to go. If you type: export foo = bar the shell will interpret that as a request to export three names: foo , = and bar . = isn't a valid variable name, so the command fails. The variable name, equals sign and it's value must not be separated by spaces for them to be processed as a simultaneous assignment and export. I faced the same error and did some research to only see that there could be different scenarios to this error. Let me share my findings. Scenario 1: There cannot be spaces beside the = (equals) sign $ export TEMP_ENV = example-value -bash: export: `=': not a valid identifier // this is the answer to the question $ export TEMP_ENV =example-value -bash: export: `=example-value': not a valid identifier $ export TEMP_ENV= example-value -bash: export: `example-value': not a valid identifier Scenario 2: Objec...

Apple - Can I Lower The Minimum Display Brightness? How?

Image
Answer : My recommendation is a hitherto-little known gem, called ScreenShade. There are several decent Mac software screen dimmers out there, of which I've found the ones whose dimming method is to apply an increasingly opaque black 'overlay' over the screen to be the most superior in appearance (providing much higher quality 'low blacks' than Shades which does its dimming via color profile/gamma level tweaking) and in doing so, also playing nice with famous color temperature regulating app, f.lux. The best examples in this group, are Shady (whose development has been abandoned by its dev and has a no better rogue clone in the Mac App Store), ScreenDimmer, Screen Shade, and Work at Night. (N.b. these last two, confusingly appear to be clones, by the same dev on the Mac App Store.) But if you're looking to more fully emulate the Mac's in-built hardware dimming in software, you're looking for an app that can have the dimming triggered via hotkey...

Chown Illegal Group Name (mac Os X)

Answer : Try using just the owner if no group. sudo chown -R user: /usr/local/var/log/couchdb illegal group name actually means that the group you're specifying (the couchdb after the colon -- the first couchdb is the user) doesn't exist. You need to either create the group, stop specifying a group, or specify a group that exists.

Can't Attach Android Studio's Debugger To Android Process

Answer : So finally I got it working, by: Checking 'Show all processes' checkbox! BUT as you see in the question, checkbox was on at the beginning, so there were multiple issues. To summarize, these are other actions to be done: Kill all adb processes (use ps -x | grep adb and kill -9 [process id] ) adb start-server in terminal Reconnect device adb devices (to make sure device is connected successfully) Make sure Android DDMS Devices | logcat shows your app and only one device is listed. Check Show all processes checkbox. See screenshot I solved this way a. Closed Android Studio b. Did adb kill-server from a terminal. Also check the adb process in also killed from the Running processes window in PC c. Started Android Studio d. Android Studio tried to initialize adb again and back to work. It could be because the release build variant (which you can set in the Build-Variants section) has been chosen mistakenly, only debug-variant is debuggabl...

Apple - AppleScript Keystroke Ignoring Numbers

Answer : Have a look at https://stackoverflow.com/questions/18136567/applescript-keystroke-not-behaving-as-expected & the list of ANSI codes at How do I automate a key press in AppleScript? It appears you're not the only one with the issue. One solution on there was to use the key code instead... tell application "System Events" key code {18} using {command down} It may depend on what app you're trying to send the keystrokes to - I just tested with an already-open blank document in Text Edit using tell application "TextEdit" to activate tell application "System Events" keystroke "abc 123" end tell & it worked as expected. A keystroke is the scripted equivalent of actually pressing that/those keys[s] How about... tell application "TextEdit" to activate tell application "System Events" keystroke "abc" keystroke space keystroke "123" end tell Some more ...

Brew Install Mysql On MacOS

Answer : I think one can end up in this position with older versions of mysql already installed. I had the same problem and none of the above solutions worked for me. I fixed it thus: Used brew's remove & cleanup commands, unloaded the launchctl script, then deleted the mysql directory in /usr/local/var , deleted my existing /etc/my.cnf (leave that one up to you, should it apply) and launchctl plist Updated the string for the plist. Note also your alternate security script directory will be based on which version of MySQL you are installing. Step-by-step: brew remove mysql brew cleanup launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist sudo rm -rf /usr/local/var/mysql I then started from scratch: installed mysql with brew install mysql ran the commands brew suggested: (see note: below) unset TMPDIR mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)...

Any Good Way To Get The New Menlo Font On Windows?

Answer : This may be a bit of a workaround - but the font is very similar to Bitstream Vera Sans Mono. Here is a comparison ( updated link ) of Menlo and Bitstream Vera Sans Mono DejaVu Sans Mono (also based on Bitstream's original). You can download the Bitstream set absolutely free (zip file). this font https://github.com/andreberg/Meslo-Font is designed to be similar to Menlo I have found a github repo. Try here https://github.com/hbin/top-programming-fonts Hope this helps.. :)

Apple - Change Shortcut To Change Input Source (keyboard Language)

Answer : Here are Apple's instructions for changing shortcuts found in PH21531: Choose Apple menu > System Preferences, click Keyboard, then click Shortcuts. Select the action (Input Sources in your case) in the list that you want to change. Double-click the current shortcut, then press the new key combination you want to use. You cannot use each type of key (for example, a letter key) more than once in a key combination. Quit and restart any apps you’re using for the new keyboard shortcut to take effect.

Apple - Alternative To TotalTerminal That Works With El Capitan

Answer : If you're willing to disable System Integrity Protection to continue using TotalTerminal, you can do that. If not, the developer of TotalTerminal says the reason he stopped working on it is that he switched to iTerm 2, which he says "offers similar functionality to Visor and comparable features to build-in [sic] Terminal.app." I've never used either, but another question on this site explains how to set up iTerm to work in a similar manner.