Skip to content

Instantly share code, notes, and snippets.

John Doe sogen

  • earworm
Block or report user

Report or block sogen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:766c8c9f7e34ffa0ff5185b514912f4d
# 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*
# 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).
View compresspdf
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
sogen / Disable accents.txt
Created Sep 18, 2019
Disable accent long press key
View Disable accents.txt
# 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
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.
View gist:fab27f8d34b71d2713deb7e344455215
# Install sharpkey
# note about voiceover (only disabled the Caps lock shortcut on OSX)
View Create own PDF filters in OSX
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.
View gist:6d8a4810b469fad98c2cade0f9908c93
sogen / zsh with nvm
Created Jul 11, 2019
Using nvm with zsh
View zsh with nvm
(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
View chrome--image-source.txt
run in Chrome to find current source image
View gist:40668c49795f03d9206854a5b850cc99
# 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
sogen / gist:1bc9224fce9122f9fa892811bf035382
Created Apr 23, 2019
Wacom Intuos - Touch not working (April 2019)
View gist:1bc9224fce9122f9fa892811bf035382
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
You can’t perform that action at this time.