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 | |
| sp="⣾⣽⣻⢿⡿⣟⣯⣷" | |
| sp="⠁⠂⠄⡀⢀⠠⠐⠈" | |
| #sp="◢ ◣ ◤ ◥" | |
| #sp="▉▊▋▌▍▎▏▎▍▌▋▊▉" | |
| #sp="▁ ▃ ▄ ▅ ▆ ▇ █ ▇ ▆ ▅ ▄ ▃" | |
| progressbar () { | |
| local processed=$1 |
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
| <?php | |
| class OutOfSerialsException extends Exception {} | |
| function next_bind_serial($serial) { | |
| $today = date("Ymd"); | |
| for ($i = 0; $i < 100; $i++) { | |
| $new_serial = $today.sprintf("%02d",$i); | |
| if ($serial < $new_serial) { |
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
| <?php namespace Laravel\Database\Eloquent; | |
| use Laravel\Str; | |
| use Laravel\Event; | |
| use Laravel\Database; | |
| use Laravel\Database\Eloquent\Relationships\Has_Many_And_Belongs_To; | |
| abstract class Model { | |
| /** |
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
| $ sudo touch /etc/NetworkManager/dispatcher.d/hotspot.sh | |
| $ sudo chmod +x /etc/NetworkManager/dispatcher.d/hotspot.sh | |
| $ sudo echo '#!/bin/bash | |
| IF=$1 | |
| STATUS=$2 | |
| if [ "$STATUS" = "up" ] && [ "$IF" = "wlan0" ]; then | |
| curl -d "param1=value1¶m2=value2" http://example.com/resource.cgi | |
| fi' > /etc/NetworkManager/dispatcher.d/hotspot.sh |
NewerOlder