Deploy entire site to server using a single command grunt deploy
- Your web application exists on your local machine in a git repo
- You can log into your server via ssh without a password
- You are using grunt for your build process
function inspect(obj, maxLevels, level) | |
{ | |
var str = '', type, msg; | |
// Start Input Validations | |
// Don't touch, we start iterating at level zero | |
if(level == null) level = 0; | |
// At least you want to show the first level | |
if(maxLevels == null) maxLevels = 1; |
Deploy entire site to server using a single command grunt deploy
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright (C) 2015 The Android Open Source Project | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.LinearGradient; | |
import android.graphics.Paint; | |
import android.graphics.Shader; | |
import android.support.annotation.ColorInt; | |
import com.squareup.picasso.Transformation; |
/** | |
* You've probably heard it before, "explicit is better than implicit". Here's a simple | |
* example of that principle in action. | |
* | |
* In this example, our app has only two Fragments that can be visible at any given | |
* moment: CreateFragment and TrendingFragment. Both examples achieve the same result | |
* when everything is working as expected, however... | |
* | |
* In the explicit example, a final else{} branch would indiciate something's not | |
* quite right with our code somewhere since we know there are only two possible |
Config Apache with /etc/apache2/conf-available/le.conf
:
Alias /.well-known/acme-challenge/ "/var/www/html/.well-known/acme-challenge/"
<Directory "/var/www/html/">
AllowOverride None
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
var http = require("https"); | |
var querystring = require('querystring'); | |
//2 attachments as JavaScript Objects | |
var attachments = [{ | |
fallback: "Attachment 1 Fallback", | |
title: "This is Attachment 1", | |
text: "Attachment 1 Text", | |
color: "#3964db" | |
}, { |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Response; | |
/** | |
* Validate Mailgun Webhooks | |
* @see https://documentation.mailgun.com/user_manual.html#securing-webhooks |
# Change to the project directory | |
cd $FORGE_SITE_PATH | |
# Turn on maintenance mode | |
php artisan down || true | |
# Pull the latest changes from the git repository | |
# git reset --hard | |
# git clean -df | |
git pull origin $FORGE_SITE_BRANCH |
Here's how to overcome this common gotcha: The default password reset system not working out of the box with Laravel 5.x (as you're not sent the user's password), without having to alter altering vendor/core. Here's how to make it work as you'd expect it to without changing any vendor files.
Firstly create a new notification for your app:
php artisan make:notification ResetPassword
Then open the newly created file: app\Notifications\ResetPassword.php
and make the following changes: