- Create droplet with Ubuntu 18.10
ssh root@[DROPLET IP ADDRESS]
- Get password from your email
- Change password on first login
adduser laravel
- Enter password and other information
# If you don't use brew services, install it | |
# https://github.com/Homebrew/homebrew-services | |
# Stop MySQL | |
brew services stop mysql@5.7 | |
# Start MySQL in safe mode | |
mysqld_safe --skip-grant-tables & | |
# Login to MySQL |
* Update (12.09.2017): I have improved the trait so that it can be used with objects other than Eloquent Models.
Some days ago I came across a task where I needed to implement managable state for an Eloquent model. This is a common task, actually there is a mathematical model called "Finite-state Machine". The concept is that the state machine (SM) "can be in exactly one of the finite number of states at any given time". Also changing from one state to another (called transition) depends on fulfilling the conditions defined by its configuration.
Practically this means you define each state that the SM can be in and the possible transitions. To define a transition you set the states on which the transition can be applied (initial conditions) and the only state in which the SM should be after the transition.
That's the theory, let's get to the work.
<?php | |
namespace App\Traits; | |
/** | |
* Trait SecureUpdatable | |
* Allows to secure update without override the existing fields in a model | |
* This dependes on the $fillable and $guarded attributes too | |
* @package App\Traits | |
*/ | |
trait SecureUpdatable | |
{ |
.Site { | |
display: flex; | |
flex-direction: column; | |
height: 100vh; /* 1 */ | |
} | |
.Site-header, | |
.Site-footer { | |
flex-shrink: 0; /* 2 */ | |
} | |
.Site-content { |
- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/
# Login via SSH with password (LOCAL SERVER) | |
> ssh brad@192.168.1.29 | |
# Create folder, file, install Apache (Just messing around) | |
mkdir test | |
cd test | |
touch hello.txt | |
sudo apt-get install apache2 | |
# Generate Keys |