in config/settings.yaml :webpack_dev_server: true
In one tab:
rails s -b '0.0.0.0'
In a 2nd tab:
| #!/bin/bash | |
| shopt -s expand_aliases | |
| set -e | |
| set -x | |
| EXPORT_ORG="export-$RANDOM" | |
| PRODUCT="prod" | |
| REPO1="katello" | |
| REPO1_URL="https://fedorapeople.org/groups/katello/releases/yum/3.8/katello/el7/x86_64/" | |
| REPO2="misc" | |
| REPO2_URL="https://partha.fedorapeople.org/test-repos/pteradactly-with-dino-errata/" |
| #!/bin/bash | |
| shopt -s expand_aliases | |
| set -e | |
| set -x | |
| IMPORT_ORG="import-$RANDOM" | |
| PRODUCT="prod" | |
| REPO1="katello" | |
| REPO2="misc" | |
| CONTENT_VIEW="view" |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'colorize' | |
| end | |
| class MatcherInterface | |
| def initialize(some_object) | |
| @some_object = some_object |
in config/settings.yaml :webpack_dev_server: true
In one tab:
rails s -b '0.0.0.0'
In a 2nd tab:
I started a project on a Hobby Dev plan (free, limit 10,000 rows), and then later needed to upgrade it to Hobby Basic ($9/month, limit 10,000,000 rows).
After assigning the new database, I had two databases attached to the application. They looked something like this:
| # add http_logger to local gems https://github.com/railsware/http_logger | |
| # then add the following to foreman/config/development.rb | |
| outbound_calls = Logger.new("#{Rails.root}/log/outbound.log") | |
| HttpLogger.logger = outbound_calls | |
| # HttpLogger.ignore = ["example\.com"] (this doesn't work for some reason) | |
| HttpLogger.log_request_body = false # Default: true | |
| HttpLogger.log_response_body = false # Default: true | |
| # You can get the outbound calls by running something like this (in foreman dir) | |
| # tail -f log/outbound.log | grep -v "Response status" | grep -v "myhostname" |
| import React, { Component } from 'react'; | |
| export default function withPropsChecker(WrappedComponent) { | |
| return class PropsChecker extends Component { | |
| componentWillReceiveProps(nextProps) { | |
| Object.keys(nextProps) | |
| .filter(key => { | |
| return nextProps[key] !== this.props[key]; | |
| }) | |
| .map(key => { |
| # add the following to your .bashrc | |
| # and run `source ~/.bashrc` | |
| function virsh-snapshot-create { | |
| cd ~/forklift | |
| vagrant halt $1 | |
| sudo virsh snapshot-create-as forklift_$1 $2 | |
| vagrant up $1 | |
| } |
On hypervisor (probably your workstation)
yum install virt-who
Edit /etc/virt-who.d/test.conf and update the rhsm_hostname, rhsm_username, rhsm_password (use dev server credentials)
[libvirt]
type=libvirt
server=qemu:///system
owner=Default_Organization
env=Library
Name,Count,Organization,Environment,Content View,Host Collections,Virtual,Guest of Host,OS,Arch,Sockets,RAM,Cores,SLA,Products,Subscriptions
fake%d,1000,Default Organization,Library,Default Organization View,"",Yes,,RHEL 6.4,x86_64,1,4 GB,1,"",69|Red Hat Enterprise Linux Server,""
host0,1,Default Organization,Library,Default Organization View,"",No,,RHEL 6.4,x86_64,1,4 GB,1,"","69|Red Hat Enterprise Linux Server,83|Red Hat Enterprise Linux High Availability (for RHEL Server)",
hammer csv content-hosts -v --file /tmp/hosts.csv
attach subs