Skip to content

Instantly share code, notes, and snippets.

View richardkiene's full-sized avatar

Richard Kiene richardkiene

View GitHub Profile
@richardkiene
richardkiene / ruby_sinatra_logos_oauth_example
Created October 23, 2013 15:02
Minimum viable OAuth 1.0a sign-in using Logos APIs
require 'sinatra'
require "oauth"
require "oauth/consumer"
require 'oauth/signature/plaintext'
require 'net/http'
require 'json/pure'
configure do
set :session_secret, "<pick something random here>"
enable :sessions
@richardkiene
richardkiene / Dockerfile
Created June 16, 2015 02:16
Dockerfile for creating an ASP.NET 5 CoreCLR app running in an lx-branded zone
FROM ubuntu:14.04
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update && apt-get install -y libunwind8 libssl-dev curl unzip libtool automake build-essential
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
RUN apt-get update
RUN apt-get install -y mono-complete
@richardkiene
richardkiene / install_coreclr.sh
Last active December 30, 2015 20:24
Install CoreCLR Development Environment on Ubuntu 14.04 LX Branded Zone
#!/bin/bash
useradd -m -c "ASP.NET user account" aspnet -s /bin/bash;
read -s -p "Enter aspnet user password: " aspnetpassword;
echo "aspnet:$aspnetpassword" | chpasswd;
adduser aspnet sudo;
echo "aspnet ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
apt-get update && apt-get -y dist-upgrade && apt-get install -y unzip curl libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev make automake libtool;
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -;
apt-get install -y nodejs;
curl -sSL https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | tar zxfv - -C /usr/local/src;
[rkiene@headnode (us-east-1) ~]$ TRACE=1 sdc-login cns
/lib/sdc/config.sh: line 73: SYSINFO_This: command not found
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:30: set -o errexit
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:31: set -o pipefail
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:33: PATH=/usr/bin:/usr/sbin:/opt/smartdc/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/custom/bin:/opt/custom/sbin:/opt/jtk/bin:/opt/chef/bin:/opt/jpc/bin:/opt/smartdc/bin:/usr/bin
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:35: admin_uuid=9dce1460-0c4c-4417-ab8b-25ca478c5a78
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:36: choice=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:37: local_only=0
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:38: my_server_uuid=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:39: to_server=0
[rkiene@headnode (us-east-1) ~]$ TRACE=1 sdc-login cns
/lib/sdc/config.sh: line 73: SYSINFO_This: command not found
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:30: set -o errexit
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:31: set -o pipefail
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:33: PATH=/usr/bin:/usr/sbin:/opt/smartdc/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/custom/bin:/opt/custom/sbin:/opt/jtk/bin:/opt/chef/bin:/opt/jpc/bin:/opt/smartdc/bin:/usr/bin
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:35: admin_uuid=9dce1460-0c4c-4417-ab8b-25ca478c5a78
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:36: choice=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:37: local_only=0
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:38: my_server_uuid=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:39: to_server=0
[rkiene@headnode (us-east-1) ~]$ TRACE=1 sdc-login cns
/lib/sdc/config.sh: line 73: SYSINFO_This: command not found
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:30: set -o errexit
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:31: set -o pipefail
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:33: PATH=/usr/bin:/usr/sbin:/opt/smartdc/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/custom/bin:/opt/custom/sbin:/opt/jtk/bin:/opt/chef/bin:/opt/jpc/bin:/opt/smartdc/bin:/usr/bin
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:35: admin_uuid=9dce1460-0c4c-4417-ab8b-25ca478c5a78
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:36: choice=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:37: local_only=0
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:38: my_server_uuid=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:39: to_server=0
[rkiene@headnode (us-east-1) ~]$ TRACE=1 sdc-login cns
/lib/sdc/config.sh: line 73: SYSINFO_This: command not found
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:30: set -o errexit
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:31: set -o pipefail
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:33: PATH=/usr/bin:/usr/sbin:/opt/smartdc/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/custom/bin:/opt/custom/sbin:/opt/jtk/bin:/opt/chef/bin:/opt/jpc/bin:/opt/smartdc/bin:/usr/bin
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:35: admin_uuid=9dce1460-0c4c-4417-ab8b-25ca478c5a78
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:36: choice=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:37: local_only=0
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:38: my_server_uuid=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:39: to_server=0
[rkiene@headnode (us-east-1) ~]$ TRACE=1 sdc-login cns
/lib/sdc/config.sh: line 73: SYSINFO_This: command not found
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:30: set -o errexit
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:31: set -o pipefail
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:33: PATH=/usr/bin:/usr/sbin:/opt/smartdc/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/custom/bin:/opt/custom/sbin:/opt/jtk/bin:/opt/chef/bin:/opt/jpc/bin:/opt/smartdc/bin:/usr/bin
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:35: admin_uuid=9dce1460-0c4c-4417-ab8b-25ca478c5a78
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:36: choice=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:37: local_only=0
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:38: my_server_uuid=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:39: to_server=0
[rkiene@headnode (us-east-1) ~]$ TRACE=1 sdc-login cns
/lib/sdc/config.sh: line 73: SYSINFO_This: command not found
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:30: set -o errexit
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:31: set -o pipefail
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:33: PATH=/usr/bin:/usr/sbin:/opt/smartdc/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/custom/bin:/opt/custom/sbin:/opt/jtk/bin:/opt/chef/bin:/opt/jpc/bin:/opt/smartdc/bin:/usr/bin
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:35: admin_uuid=9dce1460-0c4c-4417-ab8b-25ca478c5a78
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:36: choice=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:37: local_only=0
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:38: my_server_uuid=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:39: to_server=0
[rkiene@headnode (us-east-1) ~]$ TRACE=1 sdc-login cns
/lib/sdc/config.sh: line 73: SYSINFO_This: command not found
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:30: set -o errexit
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:31: set -o pipefail
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:33: PATH=/usr/bin:/usr/sbin:/opt/smartdc/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/custom/bin:/opt/custom/sbin:/opt/jtk/bin:/opt/chef/bin:/opt/jpc/bin:/opt/smartdc/bin:/usr/bin
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:35: admin_uuid=9dce1460-0c4c-4417-ab8b-25ca478c5a78
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:36: choice=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:37: local_only=0
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:38: my_server_uuid=
[2016-04-11T19:03:12Z] /opt/smartdc/bin/sdc-login:39: to_server=0