wzulfikar.com

Keep It Sane

Cover Image for Keep It Sane

This is a list of issues that I've dealt with at least once. The list would serve as a shortcut to save me time from trying to google the solution again and again. It's like index of things that had bitten me in the past.

The list will be updated from time to time as new issue occurs.

macOS

collapse
  1. Source Tree keep asking for password (image)
  • tldr: git config --global credential.helper osxkeychain
  • ref: stackoverflow
  • Keychain asking password two times
    • (Not solved yet)
  • NAS disk prompt keeps popping up
    • (Not solved yet)
  • Activate "Do Not Disturb" mode (disable all notifications)
    • alt+click on notification icon in menu bar. See: macOS_DnD.mp4.
  • macOS won't boot; grey folder with question mark appears during boot
    • Unfortunately, your SSD might have failed you. Try replacing it.
    • Blog post: WIP

Ubuntu

collapse
  1. Stuck in boot screen (Ubuntu's purple screen)

Android

collapse
  1. Termux can't access device storage
  • Open termux and run termux-setup-storage
  • Termux history is not active
    • (Not solved yet)
  • Share termux shell as web app
    • Download gotty, run ./gotty -w sh, and visit http://<device-ip>:8080 from browser.
  • Share android screen to local computer (eg. for demo/presentation)

Dev

collapse
  1. Debug GraphQL requests in browser
  • GraphQL error "GROUP BY clause is incompatible with sql_mode=only_full_group_by" - Remove 'ONLY_FULL_GROUP_BY' from mysql's sql_mode. Example:

            ```
            SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY,',''));
            ```
    
        - See: [stackoverflow](https://stackoverflow.com/questions/23921117/disable-only-full-group-by)
    
  • Setting git commit author per repo basis - run this command in root directory of git repo (based on dereenigne.org):

        ```
        echo "[user]
      name = <author name>
      email = <author oemail>" >> .git/config
        ```
    
  • Need to quickly switch proxy server for command line environment - use proxify.sh

  • Preview JSON response in Opera: - Install json-lite extension

  • Save time typing localhost by aliasing l to localhost

    • echo '127.0.0.1 l' >> /etc/hosts. curl l:3000 is now equivalent to curl localhost:3000
  • Create alias for IP address of hostpot-providing device (Android)

    • echo '192.168.43.1 android.local' >> /etc/hosts. See: stackoverflow
  • Generate fake data to fill web form

Workflow

collapse
  1. Debugging NodeJS, Go, Bash, etc. with vscode
    • (Blog post in progress)
  • need to grab screen shot and use it as quick reference - use grabit
  • need to upload file and share it randomly - use transfer.sh
  • SublimeText 3: show current file in sidebar - ctrl+0 (ctrl+zero). See: stackoverflow
  • Display full path of file in sublime
  • change command+click handler in iterm (macOS)
    • (Not solved yet)
  • Convenient scripts:

{{< load-photoswipe >}}