First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails
gem 'pry-rails', group: :development
Then you'll want to rebuild your Docker container to install the gems
You could just make your own pg_dump directly from your Heroku database. | |
First, get your postgres string using `heroku config:get DATABASE_URL`. | |
Look for the Heroku Postgres url (example: `HEROKU_POSTGRESQL_RED_URL: postgres://user3123:[email protected]:6212/db982398`), which format is `postgres://<username>:<password>@<host_name>:<port>/<dbname>`. | |
Next, run this on your command line: | |
pg_dump --host=<host_name> --port=<port> --username=<username> --password --dbname=<dbname> > output.sql |
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
class StoredProcedureService | |
def self.instance | |
@instance ||= StoredProcedureService.new | |
end | |
def execute(name, *args) | |
results = [] | |
begin | |
connection.execute("CALL #{name}(#{args.join(',')})").each(as: :hash, symbolize_keys: true) do |row| |
First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails
gem 'pry-rails', group: :development
Then you'll want to rebuild your Docker container to install the gems
class Calc | |
def sum(a, b) | |
a + b | |
end | |
def multiply(a, b) | |
a * b | |
end | |
end |
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" |
This gist aims to provide a simple solution for managing Heroku Review Apps with GitHub Actions due to the security incident that continues to disrupt Heroku's GitHub integration.
.github
├── workflows
│ ├── heroku_review_app_create.yml
│ └── heroku_review_app_destroy.yml
#!/usr/bin/env ruby | |
require "openssl" | |
require "time" | |
begin | |
require "origami" | |
rescue LoadError | |
abort "origami not installed: gem install origami" | |
end |
require 'faker' | |
require 'benchmark' | |
def generate_groups | |
(1..1_000).map do |id| | |
{ id: id, name: Faker::Educator.primary_school } | |
end | |
end | |
def generate_users(groups_ids) |