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 | |
| PERCENT_THRESHOLD=95 | |
| DISK_NAME=/dev/sda1 | |
| DISK_PERCENTAGE=$(df -hl $DISK_NAME | sed 1d | awk 'BEGIN{print "Use%"} {percent+=$5;} END{print percent}' | column -t | sed 1d); | |
| if (( $PERCENT_THRESHOLD <= $DISK_PERCENTAGE )); then | |
| curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Disk is almost full - $DISK_PERCENTAGE% used on $DISK_NAME. Threshold set to $PERCENT_THRESHOLD%.\"}" https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXX | |
| fi |
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
| var ariaCurrent = true ? "aria-current=\"page\"" : ""; | |
| <a href="https://foo.bar" @Html.Raw(ariaCurrent)>Foo</a> | |
| var ariaCurrent2 = true ? @"aria-current=""page""" : ""; | |
| <a href="https://foo.bar" @Html.Raw(ariaCurrent2)>Foo</a> |
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
| # To prevent Rekordbox from starting during boot | |
| : > ~/Library/LaunchAgents/com.pioneerdj.rekordboxdj.agent.plist && chflags uchg ~/Library/LaunchAgents/com.pioneerdj.rekordboxdj.agent.plist | |
| # To undo the change | |
| chflags nouchg ~/Library/LaunchAgents/com.pioneerdj.rekordboxdj.agent.plist |
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
| # This script will allow you to open/close a SOCKS5 tunnel as well as checking the status. | |
| # The tunnel is created by using the bind address-option in the SSH client. | |
| # The script will also terminate the tunnel if the connection is interrupted, and re-establish it when the connection is available again. | |
| # Written and tested for macOS. | |
| # Requirements: | |
| # Install screen: https://formulae.brew.sh/formula/screen | |
| # Usage | |
| # socks5 open - Checks if your Cisco AnyConnect client is connected, if so it will attempt to set up a SOCKS5 tunnel to the remote server |
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
| if [ -f .env ] | |
| then | |
| # export $(cat .env | grep 'DB_HOST' | xargs) # Read specific line | |
| # export $(cat .env | grep 'DB_HOST|DB_USERNAME|DB_PASSWORD' | xargs) # Read specific lines | |
| export $(cat .env | xargs) # Read all lines | |
| else | |
| echo "Error: could not read .env-file" && exit 1 | |
| fi |
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
| iPhone 14 Pro | |
| @media only screen | |
| and (device-width: 390px) | |
| and (device-height: 844px) | |
| and (-webkit-device-pixel-ratio: 3) { } | |
| iPhone 14 Pro Max | |
| @media only screen | |
| and (device-width: 428px) | |
| and (device-height: 926px) |
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
| wsl -- ip -o -4 -json addr list eth0 ` | |
| | ConvertFrom-Json ` | |
| | %{ $_.addr_info.local } ` | |
| | ?{ $_ } |
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
| netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=192.168.0.69 |
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
| [ | |
| { | |
| "name": "Ima Prohaska", | |
| "email": "[email protected]", | |
| "phone": "+17273931388", | |
| "company": "Sawayn-Mueller", | |
| "company_email": "[email protected]", | |
| "company_phone": "1-540-346-3726", | |
| "project_url": "pfeffer.com", | |
| "address": "7185 Considine Shore\nNew Justyn, ID 15204" |
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
| curl -v -s http://awesome-site.com 1> /dev/null |