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
| function send_mail_mg($subject, $body, $to) { | |
| $plain = strip_tags(nl2br($body)); | |
| $data = array( 'from' => SENDER_NAME . ' <support@' . MAILGUN_SITE . '>', | |
| 'to' => $to, | |
| 'subject' => $subject, | |
| 'html' => $body, | |
| 'text' => $plain); | |
| $ch = curl_init(); |
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
| function change_favicon(new_favicon_path) | |
| { | |
| $('link[rel="shortcut icon"]').remove(); | |
| $('head').append('<link id="favicon" href="'+ new_favicon_path +'" rel="shortcut icon" type="image/png" />'); | |
| } | |
| change_favicon('/paht/to/favicon.png'); |
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
| function slack_notification($message, $room = "dev", $username = "my-bot", $icon = ":robot_face:") { | |
| $room = ($room) ? $room : "dev"; | |
| $data = "payload=" . json_encode(array( | |
| "channel" => "#{$room}", | |
| "text" => $message, | |
| "icon_emoji" => $icon, | |
| "username" => $username | |
| )); | |
| // You can get your webhook endpoint from your Slack settings |
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
| # README | |
| This is a very basic repo. It consist in 2 files: | |
| 1. `addvhost.sh` | |
| 2. `wp.sh` | |
| They will help you to streamline a basic virtual host configuration in a Ubuntu machine using Nginx. Also, in case you would like to chose Wordpress, the `wp.sh` script will guide you to install it without messing around with databases, etc. It will do everything automatically. | |
| In a fresh machine, they should be used in order. |