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
$(function(exports) { | |
function handleFlickrResponse(data) { | |
// | |
} | |
// $.ajax({}); | |
exports.flickrResponse = handleFlickrResponse; | |
}(window)); |
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
# DOCKER-VERSION 0.3.4 | |
FROM centos:6.4 | |
# Enable EPEL for Node.js | |
RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
# Install Node.js and npm | |
RUN yum install -y npm | |
# Bundle app source |
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@sandbox:~/Code/node-test$ docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
57a24e50900b imdsm/centos-node-hello:latest node /src/index.js 17 minutes ago Up 17 minutes 0.0.0.0:8080->8080/tcp focused_torvalds |
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
# DOCKER-VERSION 0.9.1 | |
FROM ubuntu | |
MAINTAINER Adam K Dean | |
# Update container with dependencies | |
RUN apt-get update | |
RUN apt-get install -y python-software-properties python g++ make software-properties-common | |
# Install Node.js | |
RUN add-apt-repository ppa:chris-lea/node.js |
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
var http = require('http'), | |
httpProxy = require('http-proxy'); | |
var proxy = httpProxy.createProxyServer({}); | |
// reverse proxy server | |
http.createServer(function (req, res) { | |
var target = ''; | |
if (req.headers.host.match(/first.test/)) { |
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
core@deis-1 ~ $ journalctl -u user-configdrive.path | |
-- Logs begin at Thu 2014-12-04 12:47:56 UTC, end at Thu 2014-12-04 13:11:46 UTC. -- | |
Dec 04 12:48:02 localhost systemd[1]: Starting Watch for a cloud-config at /media/configdrive. | |
Dec 04 12:48:02 localhost systemd[1]: Started Watch for a cloud-config at /media/configdrive. |
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
core@deis-1 ~ $ ls -al /media/configdrive/openstack/latest/ | |
total 12 | |
dr-xr-xr-x 2 root root 2048 Dec 4 12:47 . | |
dr-xr-xr-x 6 root root 2048 Dec 4 12:47 .. | |
-r--r--r-- 1 root root 1289 Dec 4 12:47 meta_data.json | |
-r--r--r-- 1 root root 4733 Dec 4 12:47 user_data | |
-r--r--r-- 1 root root 994 Dec 4 12:47 vendor_data.json |
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
core@deis-1 ~ $ systemctl status user-configdrive.service | |
● user-configdrive.service - Load cloud-config from /media/configdrive | |
Loaded: loaded (/usr/lib64/systemd/system/user-configdrive.service; static) | |
Active: inactive (dead) | |
core@deis-1 ~ $ journalctl -b -u oem-cloudinit.service --no-pager | |
-- Logs begin at Thu 2014-12-04 12:47:56 UTC, end at Thu 2014-12-04 13:15:35 UTC. -- |
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
- name: 50-eth0.network | |
runtime: true | |
content: | | |
[Match] | |
Name=eth0 | |
[Network] | |
Address=$private_ipv4/24 | |
Gateway=10.21.12.1 | |
DNS=8.8.8.8 |
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/python | |
import spidev | |
import time | |
import os | |
# Open SPI bus | |
spi = spidev.SpiDev() | |
spi.open(0,0) | |