I hereby claim:
- I am rx on github.
- I am redens (https://keybase.io/redens) on keybase.
- I have a public key ASAAZ-B-ISv9frXtpgJ7e5tPAz0IkuPlvWUmKeHQHcNrwAo
To claim this, I am signing this object:
# From: https://nickcharlton.net/posts/ruby-subprocesses-with-stdout-stderr-streams.html | |
require 'open3' | |
module Utils | |
class Subprocess | |
def initialize(cmd, &block) | |
# see: http://stackoverflow.com/a/1162850/83386 | |
Open3.popen3(cmd) do |stdin, stdout, stderr, thread| | |
# read each stream from a new thread | |
{ :out => stdout, :err => stderr }.each do |key, stream| |
I hereby claim:
To claim this, I am signing this object:
{"International Date Line West"=>"Pacific/Midway", | |
"Midway Island"=>"Pacific/Midway", | |
"American Samoa"=>"Pacific/Pago_Pago", | |
"Hawaii"=>"Pacific/Honolulu", | |
"Alaska"=>"America/Juneau", | |
"Pacific Time (US & Canada)"=>"America/Los_Angeles", | |
"Tijuana"=>"America/Tijuana", | |
"Mountain Time (US & Canada)"=>"America/Denver", | |
"Arizona"=>"America/Phoenix", | |
"Chihuahua"=>"America/Chihuahua", |
Voom::Presenters.define(:test_page) do # Registers the presenter named `test_page` | |
content id: :hello_world do # Provides a content block wrapper with id :hello_world | |
heading6 "Hello World! #{Time.now}" # Displays the text as a level 6 heading | |
end | |
button :click_me do # Defines a button `CLICK ME` | |
event :click do # Listens for a `click` event on the button | |
snackbar 'hello world again!' # Displays the text in the snackbar at the bottom of the screen | |
inserts :hello_world, presenters_url(:hello_world2) # Inserts the contents of the presenter named `hello_world2` into the content block with id: `hello_world` | |
end | |
end |
This doc contains assets use to setup and give a Safe Paths and Safe Places demo.
This is the general outline of the demo. These slides should be used to guide the demo flow/discussion.
These instructions setup a demo environment for the Safe Paths App and Safe Places tool.
I ran into some issues trying to mirror a repository on Github. This Gist outlines what changes were needed to get it working.
I was attempting to follow these instructions: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/duplicating-a-repository#mirroring-a-repository-in-another-location
The problem was that the pull refs from Github generate error/warnings (and lots of them). Here is more about that: https://christoph.ruegg.name/blog/git-howto-mirror-a-github-repository-without-pull-refs.html
After issueing the git clone --mirror call I ran the following command to remove the pull request refs: git show-ref | cut -d' ' -f2 | grep 'pull' | xargs -r -L1 git update-ref -d
class Response | |
SUCCESS = 0 | |
FAILURE = 1 | |
attr_reader :data, :status, :messages | |
def initialize(data: [], | |
status: SUCCESS, | |
messages: {}) | |
@data = data | |
@status = status |
module Services | |
class DoesSomething < BaseService | |
def initialize(model_ids:) | |
@model_ids = model_ids | |
validate_params | |
end | |
def call | |
# Your service logic goes here |
module Services | |
class DoesSomething < BaseService | |
def initialize(:some_parameter, :another_parameter, | |
some_other_service: Services::SomeOtherService.new) | |
@some_parameter = some_parameter | |
@another_parameter = another_parameter | |
end | |
def call |
ruby_version = '3.0.2' | |
file '.ruby-version', "ruby-#{ruby_version}\n" | |
gem 'redis' | |
gem 'sidekiq' | |
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem | |