A blog series for PHP developers working on larger-than-average Laravel projects
Written for projects with a development lifespan of six to twelve months, with a team of three to six developers working on them simultaneously.
class Errors { | |
/** | |
* Create a new Errors instance. | |
*/ | |
constructor() { | |
this.errors = {}; | |
} | |
/** |
import { Directive, ElementRef, Input, Host, forwardRef, HostListener, Renderer, SimpleChanges } from '@angular/core'; | |
import { NgModel, ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; | |
import * as moment from 'moment'; | |
const MUTATE_VALUE_ACCESSOR_PROVIDER = [ | |
{provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MutateDirective), multi: true} | |
]; | |
@Directive({ |
.slide-up, .slide-down { | |
overflow:hidden; | |
} | |
.slide-up > div, .slide-down > div { | |
transform: translateY(-100%); | |
transition: .4s ease-in-out; | |
} | |
.slide-down > div { | |
transform: translateY(0); | |
} |
extension UITextField { | |
public override func drawPlaceholderInRect(rect: CGRect) { | |
let newColor = UIColor(white: 1, alpha: 0.4) | |
let range = NSMakeRange(0, self.attributedPlaceholder!.length) | |
var mutatedAttributedPlaceholder = NSMutableAttributedString(attributedString: self.attributedPlaceholder!) | |
mutatedAttributedPlaceholder.setAttributes([ NSForegroundColorAttributeName : newColor ], range: range) | |
self.attributedPlaceholder = mutatedAttributedPlaceholder | |
super.drawPlaceholderInRect(rect) |
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64
.vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)