- On Rackspace Public Cloud, create an 8GB General Server with Ubuntu 14.04 PVHM.
- SSH in as root. If you are really cool, use tmux at this time.
- Install OpenStack Liberty
bash <(curl -s https://raw.githubusercontent.com/openstack/openstack-ansible/liberty/scripts/run-aio-build.sh)
- Once complete, you can find the admin password in
/root/openrc
. Save it for later to log into Horizon. - Fix the neutron endpoint to work with the SDK:
lxc-ls | grep utility
.lxc-attach -n aio1_utility_container-XXX
. Replace XXX with the name you found in the last step.
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
# latitude and longitude as strings is not ideal |
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
# frozen_string_literal: true | |
class ListingDescriptionUpdater | |
class << self | |
def update | |
file = '' | |
# Commented out the array of Place, Event, Job because Events and Jobs are required to have descriptions at point of creation so there should not be anything needed to be scraped from a site. | |
# If in the future the description field is no longer a required field they can be added back as shown below. | |
# [Place, Event, Job].each do |klass| | |
[Place].each do |klass| |
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
#!/usr/bin/env puma | |
app_path = '/var/www/YOUR_APP_NAME/current' | |
directory app_path | |
environment 'production' | |
daemonize true | |
pidfile "#{app_path}/tmp/pids/puma.pid" | |
state_path "#{app_path}/tmp/pids/puma.state" | |
stdout_redirect "#{app_path}/log/puma_error.log", "#{app_path}/log/puma_access.log", true | |
threads 0,16 |
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
sudo apt-get update | |
sudo apt-get install libffi-dev libssl-dev git vim build-essential python -y | |
git clone https://github.com/openstack-dev/devstack.git | |
sudo ./devstack/tools/create-stack-user.sh | |
sudo mv devstack/ /opt/stack/ | |
rm -rf barbican/ | |
chown -R stack:stack /opt/stack/devstack/ | |
su - stack | |
cd /opt/stack/devstack/ |
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
jobs | |
|> Enum.map(fn(x) -> x.name end) | |
|> Enum.sort | |
|> Enum.chunk(5) | |
|> Enum.map(fn(x) -> Enum.shuffle(x) end) | |
# (A) is != to (B) | |
names = Enum.map(jobs, fn(x) -> x.name end) | |
sorted_names = Enum.sort(names) |
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
Server Software: | |
Server Hostname: localhost | |
Server Port: 4001 | |
Document Path: /api/contacts | |
Document Length: 2 bytes | |
Concurrency Level: 100 | |
Time taken for tests: 5.029 seconds | |
Complete requests: 10000 |
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
# They do different things. exec replaces the current process with the new process. | |
# system invokes another process and returns its exit value to the current process. | |
# backticks invokes another process and returns the output of that process to the current process. | |
while true | |
puts `bundle exec rspec 'spec/dev_free_ipad_idempotent_spec.rb'` | |
end |
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
package main | |
import ( | |
"encoding/json" | |
"io" | |
"log" | |
"net/http" | |
"strconv" | |
) |
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
package main | |
import ( | |
"errors" | |
"html/template" | |
"io/ioutil" | |
"net/http" | |
"regexp" | |
) |
NewerOlder