title: Setting Up Laravel in Ubuntu / DigitalOcean keywords: servers, laravel, coderstape, coder's tape description: Let's take a look at settting up a server from scratch for Laravel. date: April 1, 2019 tags: servers, laravel permalink: setting-up-laravel-in-ubuntu-digitalocean img: https://coderstape.com/storage/uploads/GZTXUbyGum2xeUZM9qBD5aPv8EKLwG3C8RGcRon4.jpeg author: Victor Gonzalez authorlink: https://github.com/vicgonvt
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 | |
| // Schedule the 'rocket_is_importing' filter to be added at 10:58 AM daily | |
| add_action('init', 'schedule_cache_control'); | |
| function schedule_cache_control() { | |
| if (!wp_next_scheduled('add_importing_filter_event')) { | |
| wp_schedule_event(strtotime('10:58:00'), 'daily', 'add_importing_filter_event'); | |
| } | |
| } |
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
| add_action( 'woocommerce_coupon_options_usage_limit', 'woocommerce_coupon_options_usage_limit', 10, 2 ); | |
| function woocommerce_coupon_options_usage_limit( $coupon_id, $coupon ){ | |
| echo ' | |
| '; | |
| // max discount per coupons | |
| $max_discount = get_post_meta( $coupon_id, '_max_discount', true ); | |
| woocommerce_wp_text_input( array( | |
| 'id' => 'max_discount', | |
| 'label' => __( 'Usage max discount', 'woocommerce' ), | |
| 'placeholder' => esc_attr__( 'Unlimited discount', 'woocommerce' ), |
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 push_to_datalayer($order_id) { | |
| $order = wc_get_order( $order_id ); | |
| ?> | |
| <script type='text/javascript'> | |
| window.dataLayer = window.dataLayer || []; | |
| dataLayer.push({ | |
| 'event' : 'transaction', | |
| 'ecommerce' : { |
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
| APP_NAME=Nile | |
| APP_ENV=production | |
| APP_KEY=appkeygenerate= | |
| APP_DEBUG=false | |
| APP_URL=https://app.nileuniversity.edu.ng | |
| LOG_CHANNEL=stack | |
| DB_CONNECTION=mysql | |
| DB_HOST=127.0.0.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 | |
| require 'vendor/autoload.php'; | |
| use Mailgun\Mailgun; | |
| // First, instantiate the SDK with your API credentials | |
| $mg = Mailgun::create('my-domain-apikey'); // For US servers | |
| //$mg = Mailgun::create(‘my-apikey, 'https://api.eu.mailgun.net'); // For EU servers | |
| $name = "Emmanuel"; | |
| $email = "emmanuel@email.com"; |
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 $menu_location = 'some_menu_location'; ?> | |
| <?php if ( has_nav_menu( $menu_location ) ): ?> | |
| <?php $menu_items = wp_get_nav_menu_items( wp_get_nav_menu_name( $menu_location ) ); ?> | |
| <?php foreach ( $menu_items as $menu_item ): ?> | |
| <a href="<?= esc_url( $menu_item->url ) ?>" | |
| target="<?= esc_attr( $menu_item->target ?: '_self' ) ?>" | |
| class="<?= esc_attr( implode( ' ', $menu_item->classes ) ) ?>"><?= esc_html( $menu_item->title ) ?></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
| ######################################################################## | |
| # OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2019 | |
| # ---------------------------------------------------------------------- | |
| # @Author: Andreas Hecht | |
| # @Author URI: https://andreas-hecht.com | |
| # License: GNU General Public License v2 or later | |
| # License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| ######################################################################## | |
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 | |
| $args = array( | |
| 'orderby' => 'ID' | |
| ); | |
| $terms = get_terms( 'testimonial_category', $args ); | |
| ?> | |
| <!-- bootstrap tabs --> | |
| <ul class="nav-tabs"> | |
| <?php |
$ xcode-select --install
$ softwareupdate --list
NewerOlder