Skip to content

Instantly share code, notes, and snippets.

View username1290's full-sized avatar
:octocat:
I may be slow to respond.

John Doe username1290

:octocat:
I may be slow to respond.
  • earworm
View GitHub Profile
# https://superuser.com/questions/898124/the-application-someapp-app-can-t-be-opened
# After extensive trial-and-error, and a lot of fruitless Googling, I found the solution required modifying the executable status of the "inner" application file. This line:
chmod +x SomeApp.app/Contents/MacOS/*
# Fixed the problem in all cases that I observed. The +x flags a file as executable, and the only file in the /Contents/MacOS/ directory is a binary representing the actual file that should be executed when you double-click the application (a .app file is really just a folder).
@username1290
username1290 / compresspdf
Created October 10, 2019 20:43
Compress PDF
https://blog.omgmog.net/post/compressing-pdf-from-your-mac-or-linux-terminal-with-ghostscript/
brew install ghostscript
# If you’re using Linux you can install ghostscript from aptitude, or your package manager of choice [2].
# Now, you can use ghostscript to compress your PDF file for the web:
gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/screen -dCompatibilityLevel=1.4 -sOutputFile=output.pdf input.pdf
@username1290
username1290 / Disable accents.txt
Created September 18, 2019 21:16
Disable accent long press key
https://apple.stackexchange.com/questions/332769/macos-disable-popup-showing-accented-characters-when-holding-down-a-key
# In macOS, when a key is held down while entering text, a popup is shown which lets one choose between various accented
# forms of the character. To disable this execute the following command-line in the Terminal.app:
defaults write -g ApplePressAndHoldEnabled -bool false
# Now, you'll need to log-out and log back in. This should disable the display of the popup and character typed should
# start repeating when the key is held down.
# Install sharpkey
# https://joe-watkins.io/accessibility/up-and-running-with-jaws-on-a-mac/
# note about voiceover (only disabled the Caps lock shortcut on OSX)
# https://marcozehe.wordpress.com/2015/06/07/how-to-map-your-macs-capslock-key-to-a-nvda-or-jaws-key-in-a-windows-virtual-machine/
from the comments:
Extra software is not necessarily needed on MacOS X. You can use ColorSync Utility app.
1. Open ColorSync Utility app from Applications > Utilities
2. Choose File > Open, then select your PDF document
3. When the file opens, click the Filter pop-up menu at the bottom of the window, then choose Live Update from Filter Inspector. The appearance of the PDF document will then change as you select and edit a filter in the filter inspector.
4. Create a new filter by clicking the + icon
5. Click on the dropdown to the right of your new filter Add Image Effects > Color Image Sampling and add another Add Image Effects > Image Compression
6. Play with the settings until you’re happy and proceed to Save As…. or Save the document itself and you’ll find yourself with a more compressed PDF version.
http://rubicode.com/Software/RCWebColorPicker/
@username1290
username1290 / zsh with nvm
Created July 11, 2019 00:40
Using nvm with zsh
# https://stackoverflow.com/questions/47009776/how-to-run-nvm-in-oh-my-zsh/56727768#56727768
(zsh is already installed)
1.- install nvm using the curl method
2.- edit file
nano ~/.zshrc
3.- add nvm to make it show as plugins=(git nvm)
4.- close Terminal, reopen
run in Chrome to find current source image
brilliant!
@username1290
username1290 / gist:40668c49795f03d9206854a5b850cc99
Last active July 31, 2019 18:55
WiFi issues on OSX Mojave
# some solutions
1.- Disconnect external SSD drives, USBs, _ANY_ stuff that requires power
2.- Turn ip6 off
Check what are the services:
networksetup -listnetworkserviceorder
Then run:
networksetup -setv6off Wi-Fi
3.- Activity Monitor - search DNS, kill processes
@username1290
username1290 / gist:1bc9224fce9122f9fa892811bf035382
Created April 23, 2019 22:20
Wacom Intuos - Touch not working (April 2019)
http://forum.wacom.eu/viewtopic.php?f=11&t=2581&p=7179&hilit=enable+touch+intuos#p7179
Hello, please try the following:
Open System preferences
Click on Security & Privacy
Select Accessibility
Click the padlock to enable changes
Disable WacomTouchDriver
Click the padlock again to save changes
Repeat the process and enable WacomTouchDriver