- Save
nvidia-tdp.serviceandnvidia-tdp.timerto/etc/systemd/system. - Run
sudo systemctl daemon-reload && sudo systemctl enable nvidia-tdp && sudo systemctl start nvidia-tdpto apply immediately and on future boots.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| ## | |
| # Path for the original RDB file | |
| ## | |
| rdbPath=/var/lib/redis | |
| rdbFile=dump.rdb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Hey, this is not a mirroring script, but it might taste good for what you need. | |
| # This shell script reads a CSV file, where you can pass an origin repository and makes a backup into another repository. | |
| # Lines of CSV file with 'All branchs' checked (x) will push all origin branches into the backup repository. | |
| # If you pass another value different from ¨x¨, it will push only non-existing branches on the backup repository. | |
| # | |
| # The expected format of the CSV file is below. | |
| # | |
| # +--------------------------------------------+-----------------------------------------------+-------------+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Open Activity Monitor, search for appstoreagent and stop/quit the process. | |
| 2. The Launchpad Xcode Icon should have changed from Installation to Waiting. | |
| 3. Long press the Xcode Icon and press the X to delete it. | |
| Nothing will actually happen, so I am not entirely sure if this step is actually needed, | |
| but just to be sure, I wanted to mention it. | |
| 4. Restart your MacBook. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| System process daemons that are system-wide provided by mac os x are described by launchd preference files that can be showed with the command: | |
| $ sudo ls -all /System/Library/LaunchDaemons/ | |
| Third party process daemons that are system-wide provided by the administrator are described by preference files that can be showed with the command: | |
| $ sudo ls -all /Library/LaunchDaemons/ | |
| Launch Agents that are per-user provided by mac os x usually loaded when the user logs in. Those provided by the system can be found with: | |
| $ sudo ls -all /System/Library/LaunchAgents/ | |
| Launch Agents that are per-user provided by the administrator and usually loaded when the user logs in. Those provided by the system can be found with: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Go to: | |
| /Applications/CleanMyMacX.app/Contents/Library/LoginItems/CleanMyMac X Menu.app/Contents/Library/LoginItems/CleanMyMac X HealthMonitor.app/Contents/MacOS/CleanMyMac X HealthMonitor | |
| Then add to CleanMyMac X HealthMonitor '.old' | |
| and force quit it again in activity monitor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ==UserStyle== | |
| @name google translate dark mode | |
| @version 20220201.13.28 | |
| @namespace userstyles.world/user/kedouvv | |
| @description 为谷歌翻译 web 添加深色模式 | |
| @author kedouvv | |
| @license GNU GENERAL PUBLIC LICENSE Version 3 | |
| ==/UserStyle== */ | |
| @-moz-document domain("translate.google.cn"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for f in *.extensionFile; do | |
| sudo sed -i 's/old-text/new-text/g' "$f" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from requests.exceptions import HTTPError | |
| import json | |
| try: | |
| response = requests.get('https://ipinfo.io') | |
| response.raise_for_status() | |
| jsonResponse = response.json() | |
| print(json.dumps(jsonResponse, indent=4, sort_keys=True, ensure_ascii=False)) | |
| except HTTPError as http_err: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## This script can be used to be executed for whatever you want, as you need. In my case, I put this script to run every reboot, and at 8 pm, | |
| ## so whenever I have to work, the applications related to my work will be opened/closed. | |
| ## There's another version of this script for python. You can check on: https://gist.github.com/iandark/b0ddf75569de060bc44ed3c79e27e395 | |
| execute_process() | |
| { | |
| nameProcess=$1 | |
| isExecutingCmd="pgrep -x $nameProcess" |