recentpopularlog in

kme : macos   166

later »
10 of the Best Defaults Write Commands to Improve Mac OS X
Not sure if this works in Mojave (10.14):
<code class="language-bash">defaults write expose-animation-duration -float 0.12 && killall Dock</code>
mac  osx  macos  defaults  settings  desktoptweaks  reference 
september 2019 by kme
How to Use Only a Dark Menu Bar and Dock in macOS Mojave
It's not perfect (Notification Center looks like ass, for example), but it's good enough for government work.

<code class="language-bash">defaults write -g NSRequiresAquaSystemAppearance -bool Yes</code>
macos  mojave  darkmode  dock  menubar  customization  solution  fuckina  10.14  movein 
august 2019 by kme
Bash causes high CPU - Apple Community
My 'bash -l' that was consistently using ~30% CPU and running the fan up was a sub-process of MacVim, which made me worry about an exploit of the modeline bug. But I was running an up-to-date version of MacVim, so it was a persistent problem, since before that CVE was released. Dunno.

It didn't have any interesting files or ports open, and just seemed to be recursing endlessly, so I just killed it... and all is well again?
mac  osx  macos  macvim  bash  highcpu  fanspeed  troubleshooting 
august 2019 by kme
macOS FAQ - WineHQ Wiki |
export FREETYPE_PROPERTIES="truetype:interpreter-version=35"
wine  font  rendering  freetype  smoothing  fontsmoothing  cleartype  sortof  solution  linux  mac  osx  macos 
july 2019 by kme
maint: skip a check when en_US.UTF-8 collation rules are broken
On OS X, *.UTF-8 locales use ASCII collating rules(!?):
<code class="language-bash">readlink /usr/share/locale/*.UTF-8/LC_COLLATE|sort -u
# result: ../la_LN.US-ASCII/LC_COLLATE</code>

This means that sort, and any other program that relies on strcoll,
cannot be expected to work consistently on OS X in any UTF-8 locale.
sorting  collation  i18n  locale  lc_all  macos  elcapitan  brokenness 
july 2019 by kme
Issue 23195: Sorting with locale (strxfrm) does not work properly with Python3 on BSD or OS X - Python tracker
What is 'ln_LA' anyway?
The initial difference appears to be a long-standing BSD (including OS X) versus GNU/Linux platform difference. See, for example:

Why there is no difference between en and fr UTF-8 is obvious when you look under the covers at the system locale definitions. This is on FreeBSD 10, OS X 10.10 is the same:

$ cd /usr/share/locale/fr_FR.UTF-8/
$ ls -l
total 8
lrwxr-xr-x 1 root wheel 28 Jan 16 2014 LC_COLLATE -> ../la_LN.US-ASCII/LC_COLLATE
lrwxr-xr-x 1 root wheel 17 Jan 16 2014 LC_CTYPE -> ../UTF-8/LC_CTYPE
lrwxr-xr-x 1 root wheel 30 Jan 16 2014 LC_MESSAGES -> ../fr_FR.ISO8859-1/LC_MESSAGES
-r--r--r-- 1 root wheel 36 Jan 16 2014 LC_MONETARY
lrwxr-xr-x 1 root wheel 29 Jan 16 2014 LC_NUMERIC -> ../fr_FR.ISO8859-1/LC_NUMERIC
-r--r--r-- 1 root wheel 364 Jan 16 2014 LC_TIME

For some reason US-ASCII is used for UTF-8 collation; this is also true for en_US.UTF-8 and de_DE.UTF-8, the only other ones I checked.

The postresq discussion and some earlier Python issues suggest using ICU to properly implement Unicode functions like collation across all platforms. But that has never been implemented in Python. Nosing Marc-Andre.
python  sorting  locale  collation  strings  macos  elcapitan  brokenness 
july 2019 by kme
Problems with sort order (UTF8 locales don't work) · Issue #216 · PostgresApp/PostgresApp
you can see the reason for this with ls -l /usr/share/locale/de_DE.UTF-8 you see that LC_COLLATE only symlinks to la_LN.US-ASCII. You get the same if you sort something on the shell, so it's a OS specific, not PG specific problem. AFAIR this affects all BSD OS.

Some ML posts of Tom Lane in that topic:

It seems we will have to wait for , use a different OS or use a function for sorting, that can internally use ICU form pl/perl, unaccent contrib, or your own implementation.

To me this is the biggest drawback of using PostgresApp (PostgreSQL on OSX in general) and something that should be clearly highlighted in the documentation.

@macarthy in principle, yes. You'd just need to create a new database with the collation. However, as a word of caution, UTF-8 locales seem to be fundamentally broken on OSX. Postgres uses the strcoll API, which unfortunately does not support multibyte encodings on OSX.
macos  collation  unicode  sorting  brokenness  postgresql  dba 
july 2019 by kme
Unicode collation table for swedish do no… - Apple Community
The problem is clearly in Mac OS X since other systems (Linux) do get the correct output. I've been told that the problem seems to be that sv_SE.UTF-8 locale's collation table is a symlink to "la
macos  elcapitan  sorting  colation  brokenness  sigh 
july 2019 by kme
Sorting strings properly is stupidly hard – Daniel Lemire's blog
However, I tried to test out the sorting on fr_ca locale and got the incorrect answer, which I found out was due to incorrect locale settings on Max OS X/BSD. On my machine, fr_FR.UTF-8 collation is linked to la_LN.US-ASCII
sorting  ishard  collation  strings  devel  javascript  python  pitfalls  macos  elcapitan  brokenness 
july 2019 by kme
macos - Add a locale in Mac OSX - Stack Overflow
Looking into this found that, as of Mac OS X 10.10.3, collation is still broken for Spanish and most European languages. Collation definitions for these locales are linked to an ASCII definition. This ends up breaking things such as ORDER BY clauses on PostgreSQL.

Also, WTF is does 'la_LN' mean anyway?
macos  elcapitan  annoyance  sorting  brokenness  collation  lc_all  dateandtime  unix  maybesolution 
july 2019 by kme
TableFlip - Simple Table Editor for Mac
Integrates with Marked, so maybe worth it.
markdown  tables  nonfree  macos  app  editor 
july 2019 by kme
macos - How to remove the scrollbar in on Mac OS X 10.6? - Super User
Go to System Preferences -> General and change Show scroll bars to When scrolling.
macos  mac  osx  scrollbars  annoyance  preference  solution 
july 2019 by kme
Install R with MacPorts – John Laudun
However, you run into dependency hell with 'libgcc'.

<code class="language-bash">port search --exact R</code>
mac  osx  macos  macports  r  sortof  solution 
july 2019 by kme
macos - How to prevent screen from resizing my Terminal in Mac OS X? - Super User |
Disable "session-initiated terminal resizing"; PuTTY has a checkbox for this, too.
putty  iterm  solution  screen  macos  osx  linux 
may 2019 by kme
Hyphen, En Dash, Em Dash, Minus (and their correct usage) : typography |

Em dash on Mac: Opt + Shift + dash
Em Win: Alt + 0151
En dash on Mac: Opt + Dash
En Win: Alt + 0150
Em dash on Linux: Compose + ---
En dash on Linux: Compose + --.
linux  mac  macos  windows  typography  dashes  composekey  specialcharacters  solution 
may 2019 by kme
command line - Install shuf on OS X? - Ask Different
You can install coreutils with brew install coreutils.

shuf will be linked as gshuf. Read the caveats when you install coreutils.
coreutils  mac  osx  macos  macports  textprocessing  solution  likelinux 
april 2019 by kme
Sed command returning "invalid command code" - Stack Overflow
I had this error on macOS and the problem was that '-i' expects a (zero-length) string argument. But this is a weird-ass way of telling you that.
macos  bsd  sed  shellscripting  annoyance  erromessage  solution 
march 2019 by kme
readline - python tab completion Mac OSX 10.7 (Lion) - Stack Overflow |
Putting this in a ~/.pythonrc works for Python >= 3. Python 2.7.x seems to require that you set PYTHONSTARTUP=~/.pythonrc in your login scripts.

<code class="language-python">import readline
import rlcompleter
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
readline.parse_and_bind("tab: complete")</code>
python  macos  osx  repl  tabcompletion  autocompletion  annoyance  configfile  essential  movein 
march 2019 by kme
Check and verify md5/sha1/sha256 checksums for MacOS X when I download files - nixCraft |
The solution is to check `uname -s` == "Darwin" and use `shasum -a 1` instead of `sha1sum`, which only exists on Linux
mac  osx  macos  security  checksum  hash  sha1  workaround  solution 
january 2019 by kme
macos - How to use Mac OS X Keychain with SSH keys? - Super User |
This worked!
Add the pass phrase to each ssh key to keychain: (option -k loads plain private keys only, skips certificates)
<code class="language-bash">ssh-add -K [path/to/private SSH key]</code>
ssh  keychain  mac  osx  macos  annoyance  sierra  solution 
march 2018 by kme
About the security content of macOS High Sierra 10.13.2, Security Update 2017-002 Sierra, and Security Update 2017-005 El Capitan - Apple Support |

Available for: macOS High Sierra 10.13.1, macOS Sierra 10.12.6, OS X El Capitan 10.11.6

Impact: An application may be able to read kernel memory

Description: Systems with microprocessors utilizing speculative execution and indirect branch prediction may allow unauthorized disclosure of information to an attacker with local user access via a side-channel analysis of the data cache.

CVE-2017-5754: Jann Horn of Google Project Zero, Werner Haas and Thomas Prescher of Cyberus T...
macos  kernel  security  update  meltdown 
january 2018 by kme
Using network locations (Mac OS X v10.6 and later) - Apple Support
If you want to disable a specific network port for this location, highlight the port, then click the Action Gear. Then, select "Make Service Inactive." Repeat this step for each port you want to disable in the new location.
networking  mac  osx  macos  networklocations  solution 
july 2016 by kme
Icon not visible in Yosemite's "dark menu bar" · Issue #106 · tomighty/tomighty
Workaround - if anyone else needs this:

If you haven't already, quit Tomighty (don't know if this is necessary, but I didn't want to modify the contents of the app with it still running).
Open a Finder window and go to Applications > Tomighty(.app), secondary-click and choose "Show package contents"
Inside the package, navigate to Contents > Resources.
Back up the file 'status-normal.tiff' by renaming it something like '__status-normal.tiff'
Copy status-white.tiff and call it status-normal.tiff.
Start up Tomighty again and ta-da!

Next up, I might see if I can edit all the icons to recreate them for my retina display :)
tomight  mac  osx  macos  yosemite  darkmenubar  solution 
july 2016 by kme
help/en/howto/sftp – Cyberduck
Exampe for ​iTerm:

defaults write ch.sudo.cyberduck terminal.bundle.identifier com.googlecode.iterm2
defaults write ch.sudo.cyberduck terminal.command \"set\ t\ to\ \(make\ new\ terminal\)\\ntell\ t\\nset\ s\ to\ \(launch\ session\ \\\"Default\ Session\\\"\)\\ntell\ s\\nwrite\ text\ \\\"{0}\\\"\\nend\ tell\\nend\ tell\"

Would have been great, except the AppleScript doesn't work anymore.
cyberduck  macos  mac  osx  defaultswrite  defaults  tipsandtricks  terminalapp 
june 2016 by kme
osx - How to get git-completion.bash to work on Mac OS X? - Super User []
sudo port install git-core +bash_completion

Then add the following to your ~/.profile or ~/.bash_profile:

# MacPorts Bash shell command completion
if [ -f /opt/local/etc/profile.d/ ]; then
. /opt/local/etc/profile.d/

mac  osx  macos  git  bash  completion  configfile  bashrc  solution 
june 2016 by kme
osx - Why can't Ruby find my Net::SCP? - Stack Overflow
The error message I get from 'veewee' after installing it in the usual way is "LoadError: cannot load such file -- net/scp." Apparently, it did not pull in the 'net-scp' package properly as a dependency.
I chose to install my gem home in my home directory to avoid permissions issue with OXS El Capitan. gem list shows net-scp (1.2.1) – Pierre-Loup Jan 20 at 21:47
veewee  macos  mac  osx  ruby  headache  rubygems  errormessage  solution 
june 2016 by kme
Nokogiri install fails because of missing lzma symbols in self built libxml2 · Issue #1119 · sparklemotion/nokogiri · GitHub
Ran into this problem attempting to install veewee, and something about the libxml2 2.9.4 that comes with Nokogiri (it's bundled "[b]ecause Nokogiri needs to be compiled and dynamically linked against both libxml2 and libxslt, it has gained a reputation for being complicated to install.")
installed the current version of Xcode
$ sudo port install libxml2 libxslt
$ bundle config build.nokogiri --use-system-libraries
ruby  rails  rubyonrails  library  errormessage  libxml2  macos  solution 
june 2016 by kme
Easily Add Spacers to Your Mac's Dock
Still works in Mojave (10.14)

<code style="lang-bash">defaults write persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'</code>
mac  osx  macos  mojave  10.14  dock  solution 
may 2015 by kme
Mac OS X 10.7 Lion: the Ars Technica review | Ars Technica
Most computer users aren't conscious of such subtleties, but their combined effects are profound. Long-time Mac users might remember a time when scroll thumbs were perfectly square regardless of the total size of a window's content. When I think back to my time using those scroll bars, I don't recall any problems. But just try using these so-called "non-proportional" scroll bars today. The modern computer user's mind revolts at the lack of information, usually treating it instead as misleading information about the total size of a window's content. ("This window looked like it had pages and pages of content, but when I dragged the tiny square scroll thumb all the way from the top to the bottom, it only revealed two new lines of text!") Only when this cue is gone do you realize how much you've been relying on it.
scrolling  osx  apple  macos  ui 
march 2015 by kme
SimpleCap - Screenshot Utility for MacOSX
Still works with Mojave, with a warning. If you have trouble with the program crashing because of messed up prefs, read this:
mac  osx  macos  screenshot  utility  software  essential  movein  stillworks  mojave  10.14 
june 2014 by kme
Fixing HTTPS Certificate Errors in Wget and Ruby • 55 Minutes Blog
<code class="language-bash"># Install curl-ca-bundle
sudo port install curl-ca-bundle

# Add CA_CERTIFICATE to ~/.wgetrc
echo certificate=/opt/local/share/curl/curl-ca-bundle.crt >> ~/.wgetrc</code>
mac  osx  ca  certs  https  wget  errormessage  commandline  solution  macos 
march 2013 by kme

Copy this bookmark:

to read