-
Download ruby from github.
-
Run configure (
$ ./configure
) per the readme, but with flags:a) point the destination to your desired file (
--prefix=/Users/asteel/.rvm/rubies/ruby-2.4.0
)b) if you're on OSX with brew installed openssl, (
--with-openssl-dir="$(brew --prefix openssl
)"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gm="git commit -m " | |
alias grim="git rebase -i main" | |
alias gcom="git checkout main" | |
alias gam="git commit --amend" | |
alias grc="git rebase --continue" | |
alias gra="git rebase --abort" | |
alias gsoft!="git reset --soft HEAD^" | |
alias gcp="git cherry-pick" | |
alias gcpc="git cherry-pick --continue" | |
alias gcpa="git cherry-pick --abort" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PROBLEM | |
# Service objects are almost always just functions defined as classes. They should not be initialized, as they are not | |
# used to manage internal state. They accept parameters and return values. In Ruby, this creates a lot of boilerplate. | |
# How can we trim that down? Here are some explorations. | |
require 'pry' | |
require 'securerandom' | |
# A simple factory for uniform service object definition | |
def StructServiceBase(*args, keyword_init: false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule BSTNode do | |
@null "NULL" | |
defstruct [:value, :left, :right] | |
def new(value, left \\ BSTNode.empty, right \\ BSTNode.empty) do | |
%{value: value, left: left, right: right} | |
end | |
def empty do |
-
Use these instructions as a supplement to the CircleCI instructions https://circleci.com/docs/ssh-build
-
Get dependencies
$ brew install caskroom/cask/brew-cask
$ brew cask install chicken
##Order Dependencies in Ruby's Splat & Double Splat Arguments
Ruby's splat and double splat arguments allow for some pretty flexible coding.
def print_arguments(*single, **double)
p single
p double
end