Keep It Sane
Jun 16, 2019 03:34 · 461 words · 3 minute read
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
- Source Tree keep asking for password (image)
- tldr:
git config --global credential.helper osxkeychain
- ref: stackoverflow
- tldr:
- 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
- Stuck in boot screen (Ubuntu’s purple screen)
- Login to recovery mode, run
fsck
, reboot.
- Login to recovery mode, run
- Recover data from unbootable ubuntu
- Boot to Finnix rescue cd, activate ssh server, recover data using sftp. See: Vultr blog post (or see snapshot).
Android
collapse
- Termux can’t access device storage
- Open termux and run
termux-setup-storage
- Open termux and run
- Termux history is not active
- (Not solved yet)
- Share termux shell as web app
- Download gotty, run
./gotty -w sh
, and visithttp://<device-ip>:8080
from browser.
- Download gotty, run
- Share android screen to local computer (eg. for demo/presentation)
- Install ScreenStream to stream device screen (mirror) over http. No root required. See: github repo.
Dev
collapse
- Debug GraphQL requests in browser
- Use GraphQL Network extension
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
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
- use
- Preview JSON response in Opera:
- Install json-lite extension
- Save time typing
localhost
by aliasingl
tolocalhost
echo '127.0.0.1 l' >> /etc/hosts
.curl l:3000
is now equivalent tocurl 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
- 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
- See: stackoverflow
- change command+click handler in iterm (macOS)
- (Not solved yet)
- Convenient scripts: