HEAD is pointed current branch's newest commit. (also @ is pointed same)
# first commit before
git show HEAD^
require 'sshkit' | |
require 'sshkit/dsl' | |
HOST = '' # 'foo.domain' | |
USER = '' # 'ec2-user' | |
KEYS = [''] # '~/.ssh/id_rsa' | |
hoge = "hoge" | |
command = SSHKit::Command.new <<-EOF | |
echo # Need to place bare "echo". |
require 'aws-sdk' | |
TERMINAL_CODES = %w( | |
request-canceled-and-instance-running | |
marked-for-termination | |
instance-terminated-by-price | |
instance-terminated-by-user | |
instance-terminated-no-capacity | |
instance-terminated-capacity-oversubscribed | |
instance-terminated-launch-group-constraint |
# Returns rake routes like formatted string. | |
def get_formatted_routes_data(routes) | |
inspector = ActionDispatch::Routing::RoutesInspector.new(all_routes) | |
inspector.format(ActionDispatch::Routing::ConsoleFormatter.new, nil) | |
end | |
all_routes = Rails.application.routes.routes | |
data = get_formatted_routes(all_routes) | |
list = data.split("\n") |
We have Doctor
and User
model.
We also have DoctorsUsers
model to represent with the relationship
between those two models.
apm develop <package-name>
atom -d .
https://github.com/defunkt/unicorn/blob/422a657a5f6dfb69f44feabd6429f2904ca03fa8/Sandbox#L48-L55
before_exec do |server|
ENV["BUNDLE_GEMFILE"] = "/var/www/html/my_application/Gemfile"
end
require 'net/https' | |
require 'uri' | |
require 'json' | |
require 'csv' | |
token = "*******" | |
def retrieve_stats(token) | |
url = "*******" | |
uri = URI.parse("https://api.agent-stats.com/groups/#{url}/now") |