This file contains 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
array("transformation" => array( | |
array("color" => "#fff", "overlay" => "text:70_line_spacing_20_text_align_left:aaa"), | |
array("background" => "#00214A", "crop" => "pad", "width" => "#w + 20", "height" => "h"), | |
array("background" => "#00214A", "crop" => "pad", "height" => "h + 20", "width" => "w"), | |
array("x" => 175, "y" => 175, "gravity" => "south_west", "flags" => "layer_apply"), | |
) |
This file contains 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
package controllers | |
import ( | |
"github.com/revel/revel" | |
"go-summary/app/models" | |
"golang.org/x/crypto/bcrypt" | |
"github.com/jinzhu/gorm" | |
) | |
type AuthController struct { |
This file contains 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
revel.OnAppStart(InitDB) | |
revel.InterceptMethod((*GormController).Begin, revel.BEFORE) | |
revel.InterceptMethod(AuthController.AddUser, revel.BEFORE) | |
revel.InterceptMethod(AccountController.checkUser, revel.BEFORE) | |
revel.InterceptMethod((*GormController).Commit, revel.AFTER) | |
revel.InterceptMethod((*GormController).Rollback, revel.FINALLY) |
This file contains 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
func (c AuthController) AddUser() revel.Result { | |
user := models.User{} | |
c.Txn.First(&user) | |
return c.RenderJSON(user) | |
} |
This file contains 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
func (c AuthController) connected() *models.User { | |
if c.ViewArgs["user"] != nil { | |
return c.ViewArgs["user"].(*models.User) | |
} | |
user_email, ok := c.Session["user_email"] | |
if ok && user_email != ""{ | |
var user models.User |
This file contains 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 App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\Artisan; | |
use Illuminate\Support\Facades\Cache; | |
use Predis\Client; | |
class MonitorRedisMaster extends Command |