- Go here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Download SDK 8u171 for MacOS 64: jdk-8u171-macosx-x64.dmg
- Install
- Reload/restart terminal
brew install elasticsearch
brew services start elasticsearch
This file contains hidden or 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
require_relative './jukebox' | |
RSpec.configure do |config| | |
config.color_enabled = true | |
config.tty = true | |
# Use the specified formatter | |
config.formatter = :documentation # :progress, :html, :textmate | |
end | |
def capture_stdout(&block) |
This file contains hidden or 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
require File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
# Require the gems listed in Gemfile, including any gems | |
# you've limited to :test, :development, or :production. | |
Bundler.require(:default, Rails.env) | |
module TemplateTest | |
class Application < Rails::Application |
This file contains hidden or 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
class BST | |
attr_accessor :data, :left, :right | |
def initialize(data) | |
@data = data | |
end | |
def insert(data) | |
if data <= self.data | |
do_insert("left", data) |
This file contains hidden or 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
[user] | |
name = me | |
email = [email protected] | |
[alias] | |
s = status -s | |
cm = commit -m | |
br = branch | |
branches = branch -a | |
del = branch -d | |
co = checkout |
This file contains hidden or 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
staging: | |
rails: | |
configuration: | |
asset_pipeline_precompile: false |
This file contains hidden or 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
Get a deserialized object from a delayed job: | |
1. Get the delayed_job record using the id: dj = DelayedJob.find(<id>) | |
2. Get the handler field from dj: dj.handler | |
3. Convert it from YAML: YAML.parse(dj.handler) | |
4. You can get the ruby objects that the delayed job was built with by converting that to_ruby and calling the object: | |
YAML.parse(dj.handler).to_ruby.user | |
YAML.parse(dj.handler).to_ruby.prospect | |
YAML.parse(dj.handler).to_ruby.agent | |
etc. |
This file contains hidden or 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
for i in $(docker ps | awk '{print $1 ":" $2}') | |
do | |
container_id=$(echo $i | awk -F ':' '{print $1}') | |
container_service=$(echo $i | awk -F ':' '{print $2}') | |
container_ip_address=$(weave ps | grep $container_id | awk '{print $NF}') | |
echo "${container_service} : ${container_ip_address}" | |
done |
This file contains hidden or 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
ReactDOM.render( | |
<h1>Hello, world!</h1>, | |
document.getElementById('root') | |
); | |
<div id="root"></div> |
This file contains hidden or 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
AuctionatorBagItemSelectedMixin = CreateFromMixins(AuctionatorBagItemMixin) | |
local seenBag, seenSlot | |
function AuctionatorBagItemSelectedMixin:OnClick(button) | |
if not self:ProcessCursor() then | |
AuctionatorBagItemMixin.OnClick(self, button) | |
end | |
end |