Show search results based on a specific language on Google
Go to Google Search Settings → Other Settings → Language & region → Result language & region → Results language filter
[macOS] Quickly trim video (also in case that in Quicktime, Edit → Trim is disabled)
Instead of opening the file in QuickTime, go to Finder, right-click on the file, select Quick Actions, then choose Trim (or Rotate)
Turn on/off auto dark mode for web content in Chrome
- Go to
brave://flags/
, search for "dark", and select disabled/enabled/default for "Auto Dark Mode for Web Contents"
- For the Inspect Element panel: open it, click the gear icon (Settings) in the top right, go to Preferences, select Theme, and choose your preferred option
[iOS] How to disable “double click on side button” to install a new app on App Store?
Solution 1: Turn off "iTunes & App Store" in Face ID & Passcode settings, then try again. An "Install" button will appear at the bottom of the screen instead of requiring the side button.
Soluton 2 (if solutoin 1 not working)
- Settings → Screen Time → Content & Privacy Restrictions → Enable → App Installation & Purchases → Require Password → choose “Always Require”
- Settings → Face ID & Passcode → Turn off “iTunes & App Store”
- Try installing the app again, it will ask you to type password instead of doubling the side button.
View jupyter notebook on Chrome
Install this extension. Go to its settings, turn on “Allow access to file URLs”. Open the notebook with Chrome, that’s it.
Use Preview (on macOS) to modify quickly a photo copied from clipboard
- Screen capture (to clipboard)
- Open Preview (from spotlight)
- Press
cmd
+N
(or select File > New from clipboard)
- Then select icon “Show makeup toolbar”
- and voilà
Convert
.ts
to .mp4
with one or multiple files or a whole folder1# install
2brew install ffmpeg
1# in .zshrc or .bashrc
2alias ts_to_mp4='function _ts_to_mp4() {
3 # If no arguments are passed, use the current directory
4 if [ "$#" -eq 0 ]; then
5 for file in ./*.ts; do
6 [ -e "$file" ] && ffmpeg -i "$file" -c copy "${file%.*}.mp4"
7 done
8 # If a directory is passed, process all .ts files in the directory
9 elif [ -d "$1" ]; then
10 for file in "$1"/*.ts; do
11 [ -e "$file" ] && ffmpeg -i "$file" -c copy "${file%.*}.mp4"
12 done
13 # Otherwise, treat the arguments as individual files
14 else
15 for file in "$@"; do
16 if [ -f "$file" ]; then
17 ffmpeg -i "$file" -c copy "${file%.*}.mp4"
18 else
19 echo "$file is not a valid file"
20 fi
21 done
22 fi
23}; _ts_to_mp4'
1ts_to_mp4 file.ts # auto convert to file.mp4
2ts_to_mp4 file1.ts file2.ts
3ts_to_mp4 . # current folder
4ts_to_mp4 tmp/
Apple Watch disconnected unexpectedly with iPhone (tested with iOS beta)
Only iPhone get beta update, Watch still uses the stable one.
- On phone, open Watch app → “All Watches” → (i) → “Unpair Apple Watch” → Có thể nó báo có lỗi trong quá trình unpair nhưng sau đó thì vẫn unpair được (ko thấy watch trong app này nữa)
- Trên Watch, nhớ backup trước, sau đó chọn reset hoàn toàn.
- Khởi động lại watch lẫn iphone xong để gần phone cho nó pair lại + restore backup là ok.
“No SIM” or cannot send SMS with eSIM on iPhone
- First, check if your iPhone is unlock.
Finally, I have to remove and deactivate eSim and command a physical sim instead!
Quickly fit width screen for GoodNotes
Just double tapping with single finger.
Keep light mode for Chrome on MacOS
Using below command and don't forget to restart Chrome.
1defaults write com.google.Chrome NSRequiresAquaSystemAppearance -bool YES
Change keyboard shortcut for Dev Tools of Chromium browsers
We cannot change directly in the browser.
- Native: In the Settings page of Dev Tools, click on "Experiments", search for "key" and tick "Enable keyboard shortcut editor". Reload the Dev Tools and click on "Shortcuts", you will see the edit button on right of each shortcut.
- (Another way) On Mac, we can add the custom by going to System Preferences > Keyboard > App Shortcuts > "+" > Choose the app (eg. "Google Chrome.app") > Type exactly the name of commands, eg "Inspect elements".
Connect localhost of another computer from this computer
On the "host" computer, use
ifconfig
(linux, macos) or ipconfig
(windows) to know the ip address (something like 192.168.1.109
). From the "client" computer, browser http://192.168.1.109:4000
(make sure on the "host", localhost:4000
is working).Change default directory in cmder
- Go to settings
- Then, Startup > Tasks
- Choose
{cmd::Cmder}
- Choose the below-right box, let the cursor at the end of the text
- Click on "Startup dir…"
- Choose your desired directory > OK
- Remove the current line with the new appearing one (
new_console:d:%USERPROFILE%
)
- Click on Save settings
Disable navigation by cursor on Brave (cursor showing up in the window at all times)
Toggle
F7
.Cortana uses Chrome instead of Edge
- Download and install this app (reinstall it after every update of Windows).
- Choose EdgeDeflector as the default web browser if it asks.
- Install this extension in Chrome to force to redirect from Bing to Google Search Engine.
Change default directory in PowerShell
- Create a folder in your Documents folder called WindowsPowerShell
- Create a file called
profile.ps1
inside this folder
- Add following command
Set-Location c:\\abc
- Every time you launch PowerShell, the profile script will be executed
Problem of hsts
Cannot open a page with security problem.
- Go to
chrome://net-internals/#hsts
- "Query HSTS/PKP domain", fill domain, e.g.
gitlab.powerop.io
.
- "Delete domain security policies", fill domain and click on Delete.
- Try again > Click on "Advanced" > Click on ...unsafe....
Download flash video
In the case browser extensions cannot capture the url, you can open the Developer Tools (in Chrome, press
F12
) > Reload the page and click to play again the video > Network tab > Media tab > click on any sources on the left column (videoplayback?expire...
) > On the right column, in tab Headers > General > Copy the content in Request URL, something like below,1<https://r4---sn-25ge7ns7.googlevideo.com/videoplayback?expire=1568040368&ei=kEl2Xb...f_cW7qE=>
Open a new tab in your browser, <kbd>Ctrl</kbd> + <kbd>S</kbd> to save the video. You can also open the Downloads manager in your browser (<kbd>Ctrl</kbd> + <kbd>J</kbd>) to copy the download link and use other Download Manager tools to download this video without using the browser!
Split mp3 audio into tracks
It's useful if you download mp3 audio from a youtube video.
- Download & Install Audacity (free, available for macos, linux, windows).
- Check this official manual. Shortly,
- Select start and end (type number) at the sectio below "Start and End of Selection".
- Using
cmd + B
to "Add label at selection" - Name for labels: Whenever a label is created, a small rectangle box appear next to the label point, click there to name the label.
- After adding all necessary labels, File > Export > Export Multiple > Split file based on "Labels" (tick on "Include audio before the first label) > "Name file" (should choose "Using Label/Track Name") option and then "Export".