Não use UUID como PK nas tabelas do seu banco de dados.
| # This is a little experiment in using Turbo Frames and Streams without Rails. | |
| # Built using just plain Sinatra as the web server. | |
| # | |
| # Make sure that you have sinatra and puma (or some other server) installed: | |
| # gem install sinatra | |
| # gem install puma | |
| # | |
| # You can then run the app with: | |
| # ruby app.rb | |
| require 'sinatra' |
| package main | |
| import ( | |
| "net/http" | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "os" | |
| ) |
| ;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*- | |
| ;; Copyright (c) 2025 Nicolas P. Rougier | |
| ;; Released under the GNU General Public License 3.0 | |
| ;; Author: Nicolas P. Rougier <[email protected]> | |
| ;; URL: https://github.com/rougier/nano-emacs | |
| ;; This is NANO Emacs in 256 lines, without any dependency | |
| ;; Usage (command line): emacs -Q -l nano.el -[light|dark] |
| <?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)"