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
Building native extensions. This could take a while... | |
ERROR: Error installing rails: | |
ERROR: Failed to build gem native extension. | |
/usr/bin/ruby1.9.1 extconf.rb | |
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from extconf.rb:1:in `<main>' | |
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
PROVISIONED="/some-app-dir/PROVISIONED"; | |
if [[ -f $PROVISIONED ]]; then | |
echo "Skipping provisioning"; | |
exit; | |
else | |
echo "Provisioning"; | |
fi | |
#...do provisioning things |
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
{ | |
"OwnerId": "121456789127", | |
"ReservationId": "r-48465168", | |
"Groups": [], | |
"Instances": [ | |
{ | |
"Monitoring": { | |
"State": "disabled" | |
}, | |
"PublicDnsName": null, |
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
I found a good example of how to parse JSON with ruby on stack overflow here => http://stackoverflow.com/a/13625633 | |
For an example of AWS JSON, I found an example at (http://unix.stackexchange.com/questions/121718/how-to-parse-json-with-shell-scripting-in-linux), but I fixed some errors in the json and have a copy here (https://gist.github.com/Cinderhaze/f122232d15eb700449f0) | |
I put the above json in a file (ec2s.json) and ran 'gem install json' | |
I have tried the following in IRB | |
require 'json' | |
file = File.open('ec2s.json') | |
contents = file.read | |
file.close |
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
# JSON Parsing example | |
require "rubygems" | |
require "json" | |
string = '{"desc":{"someKey":"someValue","anotherKey":"value"},"main_item":{"stats":{"a":8,"b":12,"c":10}}}' | |
parsed = JSON.parse(string) # returns a hash | |
p parsed["desc"]["someKey"] | |
p parsed["main_item"]["stats"]["a"] |
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
[ec2-user@ip-172-31-44-96 modules]$ gem list | |
*** LOCAL GEMS *** | |
bigdecimal (1.2.0) | |
jmespath (1.1.3) | |
json (1.8.2) | |
nokogiri (1.6.1) | |
psych (2.0.0) | |
rdoc (4.1.0) |
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
// Use this include for the Web IDE: | |
#include "OneWire/OneWire.h" | |
// Use this include for Particle Dev where everything is in one directory. | |
// #include "OneWire.h" | |
// This library can be tested on the Core/Photon by running the below | |
// DS18x20 example from PJRC: | |
// OneWire DS18S20, DS18B20, DS1822 Temperature Example |
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
==> default: Running provisioner: shell... | |
default: Running: /var/folders/fk/pjhgc92d7f9ctbfg50x2x7wc0000gp/T/vagrant-shell20160205-39791-zjbwih.sh | |
==> default: stdin: is not a tty | |
==> default: Reading package lists... | |
==> default: Building dependency tree... | |
==> default: Reading state information... | |
==> default: wget is already the newest version. | |
==> default: 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. | |
==> default: Err http://apt.puppetlabs.com trusty InRelease | |
==> default: |
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
FROM ubuntu:15.10 | |
| |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
git \ | |
libxml2 libxml2-dev libxslt1-dev \ | |
ruby2.2 \ | |
ruby2.2-dev \ | |
rubygems | |
|
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@ubuntu:~$ docker run -ti centos:6.6 /bin/bash | |
Unable to find image 'centos:6.6' locally | |
6.6: Pulling from library/centos | |
a3ed95caeb02: Already exists | |
35d9d5d11536: Pull complete | |
Digest: sha256:cca50b07742e20c386025f231b5667b5051603e4f8e656da6442a39c0b96e680 | |
Status: Downloaded newer image for centos:6.6 | |
[root@649d1ea68df1 /]# sudo rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm | |
bash: sudo: command not found | |
[root@649d1ea68df1 /]# rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm |
OlderNewer