-- listen for console connection with the given secret key
-- controlSocket("0.0.0.0")
-- setKey(please generate a fresh private key with makeKey())
-- start the web server on port 8083, using password 'set a random password here'
-- webserver("0.0.0.0:8083", "set a random password here")
-- accept DNS queries on UDP/5200 and TCP/5200
This file contains 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
If the Spotlight is indexing data on your Mac, the mds and mds_stores will cost a relatively high CPU at that duration | |
1. Turning off indexing on all drives: `sudo mdutil -a -i off` | |
2. Stop `mds` service: `sudo launchctl stop /System/Library/LaunchDaemons/com.apple.metadata.mds.plist` | |
## Additional steps: | |
- Use [Raycast](https://www.raycast.com/) | |
- Disable Spotlight hotkey: System Preferences > Keyboard > Keyboard Shortcuts… > Spotlight > Uncheck “Show Spotlight search” |
This file contains 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
# Get the latest version of pushgateway from prometheus.io, then download and extract: | |
$ wget https://github.com/prometheus/pushgateway/releases/download/v0.8.0/pushgateway-0.8.0.linux-amd64.tar.gz | |
$ tar -xvf pushgateway-0.8.0.linux-amd64.tar.gz | |
# Create the pushgateway user: | |
$ useradd --no-create-home --shell /bin/false pushgateway | |
# Move the binary in place and update the permissions to the user that we created: | |
$ cp pushgateway-0.8.0.linux-amd64/pushgateway /usr/local/bin/pushgateway | |
$ chown pushgateway:pushgateway /usr/local/bin/pushgateway |
This file contains 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
# Reference: https://superuser.com/questions/513159/how-to-remove-systemd-services | |
systemctl stop [servicename] | |
systemctl disable [servicename] | |
rm /etc/systemd/system/[servicename] | |
rm /etc/systemd/system/[servicename] # and symlinks that might be related | |
rm /usr/lib/systemd/system/[servicename] | |
rm /usr/lib/systemd/system/[servicename] # and symlinks that might be related | |
systemctl daemon-reload | |
systemctl reset-failed |
This file contains 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
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
This file contains 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
# used different forum posts/guides to figure this out like: | |
# The uninstall script is located at /Library/Parallels/Parallels Service.app/Contents/Resources | |
# https://github.com/danijeljw/remparallels/blob/master/remprls.sh | |
# https://kb.parallels.com/122461 | |
# sudo find / -iname "*parallels*" | |
# sudo find / -iname "*prl*" | |
#before uninstalling deactivate your licencse - this won't be possible after uninstall | |
prlsrvctl deactivate-license |
This file contains 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
package main | |
import ( | |
"fmt" | |
"math" | |
"strconv" | |
) | |
var ( | |
sizeInMB float64 = 999 // This is in megabytes |
This file contains 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
package main | |
import ( | |
"crypto/md5" | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"strconv" | |
"text/template" |
This file contains 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
// curl -X POST -H "Content-Type: application/octet-stream" --data-binary '@filename' http://127.0.0.1:5050/upload | |
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"time" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
NewerOlder