- 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
Net::SSH.start(FileServerIP, "root", password: FileServerPassword, config: false) do |ssh| | |
objects.each do |o| | |
ssh.exec!("cmd.exe /c /cygwin/bin/curl.exe \"#{o.download_url}\" > \"#{dir}\\#{o.file_file_name}\"") | |
end | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
/* | |
The "this" parameter is just relabled as "button" here for our own clarity | |
Note: You cannot use the "this" keyword as a parameter argument name. | |
*/ | |
function modifyButtonLabel(button) { |
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
post "updates/:id/shares/:share_id/confirm" => "updates#confirm", constraints: { id: /\D*/, share_id: /\D*/ }, as: "confirm_share" | |
ActionController::UrlGenerationError: | |
No route matches {:id=>1, :share_id=>1, :format=>:json, :controller=>"api/v1/updates", :action=>"confirm"} |
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
iex(20)> add_one = &(&1 + &1) | |
** (SyntaxError) iex:20: invalid token: &(&1 + &1) | |
/usr/local/Cellar/erlang-r16/R16B01/lib/erlang/lib/parsetools-2.0.9/include/yeccpre.hrl:128: :elixir_parser.yecctoken_end_location/1 | |
/usr/local/Cellar/erlang-r16/R16B01/lib/erlang/lib/parsetools-2.0.9/include/yeccpre.hrl:113: :elixir_parser.yeccpars1/7 | |
/usr/local/Cellar/erlang-r16/R16B01/lib/erlang/lib/parsetools-2.0.9/include/yeccpre.hrl:56: :elixir_parser.yeccpars0/5 | |
src/elixir_translator.erl:16: :elixir_translator.forms/4 | |
/private/tmp/elixir-HbPi/elixir-0.9.2/lib/iex/lib/iex/server.ex:78: IEx.Server.eval/4 | |
/private/tmp/elixir-HbPi/elixir-0.9.2/lib/iex/lib/iex/server.ex:37: IEx.Server.do_loop/1 | |
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
Adam: | |
Live coding -- extracting a gem from an existing application | |
Tony: | |
Faraday - a gem that provides a common interface to different http adapters, extensible via middleware a la rack. |
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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
NewerOlder