Não use UUID
como PK nas tabelas do seu banco de dados.
<?php | |
// Start / Stop / Reboot MySQL Database server using SSH with PHP | |
// Requires the library from phpseclib.sourceforge.net / https://github.com/phpseclib/phpseclib | |
// Server user login data | |
$ssh_user = ''; | |
$ssh_password = ''; | |
$ssh_server_ip = ''; | |
?> | |
<!DOCTYPE html> |
On Tue, Mar 12, 2013 at 1:26 PM, Martin Fowler [email protected] wrote:
The term pops up in some different places, so it's hard to know what it means without some context. In PoEAA I use the pattern Service Layer to represent a domain-oriented layer of behaviors that provide an API for the domain layer. This may or may not sit on top of a Domain Model. In DDD Eric Evans uses the term Service Object to refer to objects that represent processes (as opposed to Entities and Values). DDD Service Objects are often useful to factor out behavior that would otherwise bloat Entities, it's also a useful step to patterns like Strategy and Command.
It sounds like the DDD sense is the sense I'm encountering most often. I really need to read that book.
The conceptual problem I run into in a lot of codebases is that rather than representing a process, the "service objects" represent "a thing that does the process". Which sounds like a nitpicky difference, but it seems to have a real impact on how people us
# | |
# A: | |
# pubsub = PgPubSub.new('channelname') | |
# pubsub.subscribe do |data| | |
# puts "data: #{data} is coming!" | |
# end | |
# | |
# B: | |
# pubsub = PgPubSub.new('channelname') | |
# pubsub.publish("hello world") |
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
Installing Xcode and the command line tools need to be done first because it installs gcc
.
https://developer.apple.com/xcode/features/
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'rails', '5.2.0' # use correct rails version |
Advice: if you have style guide / policy, apply it automatically ( in the editor or git hook ) https://github.com/jshint/fixmyjs
Collection of (mostly) JS styles (pick one you like or write another one if none fits you)
- list of lists: http://www.jstherightway.org/
This is a list of examples and articles, in roughly the order you should follow them, to show and explain how promises work and why you should use them. I'll probably add more things to this list over time.
This list primarily focuses on Bluebird, but the basic functionality should also work in ES6 Promises, and some examples are included on how to replicate Bluebird functionality with ES6 promises. You should still use Bluebird where possible, though - they are faster, less error-prone, and have more utilities.
I'm available for tutoring and code review :)
You may reuse all gists for any purpose under the WTFPL / CC0 (whichever you prefer).