Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| require 'observer' | |
| class CoffeeShop | |
| include Observable | |
| attr_reader :customers | |
| def initialize(name, capacity) | |
| @name = name | |
| @capacity = capacity | |
| @customers = [] |
| alias k='clear' | |
| alias ll='ls -al' | |
| alias fs='foreman start -f Procfile.dev' | |
| alias gcd='git checkout develop' | |
| alias gcp='git checkout -' | |
| alias grd='git rebase develop' | |
| alias gam='git commit --amend --no-edit' | |
| alias gpf='git push -f' | |
| alias gcb='git checkout -b' | |
| alias gp='git pull origin' |
| input { | |
| tcp { | |
| port => 5000 | |
| } | |
| } | |
| filter { | |
| grok { | |
| match => { | |
| "message" => "%{SYSLOG5424PRI:pri}%{NUMBER:rfc_version} %{TIMESTAMP_ISO8601:timestamp} d.%{UUID:drain_id} %{WORD:app} %{USERNAME:dyno} - - %{GREEDYDATA:message}" |
| version: '2' | |
| services: | |
| elasticsearch: | |
| build: | |
| context: elasticsearch/ | |
| args: | |
| ELK_VERSION: $ELK_VERSION | |
| volumes: |
| class Node: | |
| def __init__(self, val): | |
| self.val = val | |
| self.left_child = None | |
| self.right_child = None | |
| # def get(self): | |
| # return self.val | |
| # def set(self, val): |
| class MyJob < ActiveJob::Base | |
| queue_as :urgent | |
| rescue_from(NoResultsError) do | |
| retry_job wait: 5.minutes, queue: :default | |
| end | |
| def perform(*args) | |
| MyService.call(*args) | |
| end |
| # app/jobs/example_job.rb | |
| class ExampleJob < ActiveJob::Base | |
| queue_as :default | |
| rescue_from(ActiveRecord::RecordNotFound) do | |
| retry_job wait: 1.minute, queue: :default | |
| end | |
| def perform(param_1, param_2) |